I'm designing building equipment (electricity) I draw blueprints using free software called Jw_cad. Basically, I want to work comfortably, so I want to reduce the work load by linking Jw_cad and Python. ~~ I want to take a day off ~~
As a stepping stone, let's use Python by using Jw_cad's [External transformation] function.
It is a function that other applications process things that cannot be done with Jw_cad and reflect them on Jw_cad.
Operationally
The way to put Python here is
This page explains from creation of external transformation file to execution
.
First, let's briefly explain the .bat file. A file that executes the contents described in the .bat file.
Type the following content in Notepad, save it as a name, and save it as hogehoge.bat
.
@echo off ← Magic.
REM external transformation start(hello world!!) ← Jw_Display name on the screen to select external transformation on cad
REM #jww ← Meaning of "This external transformation is in jww format"
echo hello world!!← hello world on the command prompt!!Is displayed.
pause >nul ← The command prompt is displayed for a moment and disappears, so enter a pause`pause`。
If you write REM ~~~
in a normal .bat file,
Even if I write it, it will not be executed, but
In Jw_cad, the description REM # ~~~
is a command that works only in Jw_cad.
If you select hogehoge.bat
in Jw_cad for the above string
An external variant file that displays hello world !!
on the command prompt.
To open the external transformation file with Jw_cad, select [Others] → External transformation (G) → hogehoge.bat
When hogehoge.bat is selected, hello world !!
is displayed at the command prompt.
On this page, as a foundation for Python to work I explained how to create a .bat file for external transformation and execute it from Jw_cad. In (Part 2), I would like to explain REM # ~~~ described in the external transformation .bat file.
Jw_cad page ← This is the official page of Jw_cad. Markdown notation cheat sheet ← I used it as a reference in how to write Qitta.
Recommended Posts