How to utilize Python with Jw_cad (Part 1 What is external transformation)

How to use Python with Jw_cad (Part 1)

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.

What is [external deformation]?

It is a function that other applications process things that cannot be done with Jw_cad and reflect them on Jw_cad.

Operationally

  1. "Select external transformation file (.bat) from Jw_cad"
  2. "Process as described in the .bat file"
  3. "Reflect on Jw_cad"

The way to put Python here is

  1. "Select external transformation file (.bat) from Jw_cad"
  2. "Call " Python " in a .bat file"
  3. "Reflect on Jw_cad" The flow.

This page explains from creation of external transformation file to execution.

Create a .bat file for [External transformation]

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.

[External transformation] Execute hogehoge.bat

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 外部変形.png When hogehoge.bat is selected, hello world !! is displayed at the command prompt.

Summary

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.

References / Software

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

How to utilize Python with Jw_cad (Part 1 What is external transformation)
How to use Python with Jw_cad (Part 2 Command explanation and operation)
How to measure execution time with Python Part 1
How to measure execution time with Python Part 2
How to upload with Heroku, Flask, Python, Git (Part 1)
How to upload with Heroku, Flask, Python, Git (Part 2)
[Python] What is a with statement?
Python: How to use async with
How to get started with Python
What to do with PYTHON release?
How to use FTP with Python
How to calculate date with python
How to authenticate with Django Part 2
How to authenticate with Django Part 3
How to use an external editor for Python development with Grasshopper
[Python] What is a slice? An easy-to-understand explanation of how to use it with a concrete example.
[Pandas] What is set_option [How to use]
python3 How to install an external module
How to work with BigQuery in Python
[Python] What is pip? Explain the command list and how to use it with actual examples
How to do portmanteau test with python
How to display python Japanese with lolipop
[Part1] Scraping with Python → Organize to csv!
How to enter Japanese with Python curses
[Python] How to deal with module errors
How to use is and == in Python
How to install python3 with docker centos
[Python] What is a formal argument? How to set the initial value
How to crop the lower right part of the image with Python OpenCV
[Introduction to Python] What is the method of repeating with the continue statement?
How to write what to do when an application is first displayed in Qt for Python with Designer
What is python
What is Python
[What is an algorithm? Introduction to Search Algorithm] ~ Python ~
How to read a CSV file with Python 2/3
How to enjoy programming with Minecraft (Ruby, Python)
[REAPER] How to play with Reascript in Python
How to do multi-core parallel processing with python
Strategy on how to monetize with Python Java
[Python] How to draw multiple graphs with Matplotlib
[Python] How to read excel file with pandas
How to crop an image with Python + OpenCV
How to specify attributes with Mock of python
What are you comparing with Python is and ==?
How to use tkinter with python in pyenv
[AWS / Lambda] How to load Python external library
[Python] How to handle Japanese characters with openCV
[Python] How to compare datetime with timezone added
How to convert / restore a string with [] in python
How to add help to HDA (with Python script bonus)
How to install Python
[Python] How to draw a line graph with Matplotlib
How to scrape image data from flickr with python
How to do hash calculation with salt in Python
[Python] What is Pipeline ...
[Introduction to Python] How to iterate with the range function?
Explain in detail how to make sounds with python
How to run tests in bulk with Python unittest
[Python] How to specify the download location with youtube-dl
How to install python
How to measure mp3 file playback time with python