07-25-2019 02:04 AM
Hi all,
I have a DXF file in LabVIEW. I want to pass the data in the DXF file to Python. The DXF data will not be used by LabVIEW. It will only be sent to Python for use. Any idea about how to read the DXF data in LabVIEW.
Any kind of help will be highly appreciated.
Thanks in advance.
Solved! Go to Solution.
07-25-2019 03:38 AM
Hi,
dou you want to pass the data as bytes or as text?
Regards,
Kevin
07-25-2019 05:54 AM
Pass the bytes (array or string), or pass the path (string).
07-25-2019 08:25 AM
Hi,
please have a look at the attached VI. It extracts bytes from the file and you could pass them to python.
Regards,
Kevin
07-30-2019 01:33 AM
Hi kevin,
I have tried out this method (Passing DXF as String to Python).But Python is not able to recreate the DXF from the String received from LabVIEW.
Anyways, Thanks a lot.
07-30-2019 01:35 AM
Hi Wiebe,
Passing file path is an option if LabVIEW and Python are running on the same system.But in our case both will be running on separate systems.
07-30-2019 01:55 AM
@Deep33 wrote:
Hi Wiebe,
Passing file path is an option if LabVIEW and Python are running on the same system.But in our case both will be running on separate systems.
That would indeed ruin the plan...
07-30-2019 01:58 AM
@Deep33 wrote:
Hi kevin,
I have tried out this method (Passing DXF as String to Python).But Python is not able to recreate the DXF from the String received from LabVIEW.
Anyways, Thanks a lot.
Strings are probably interpreted in several ways. And\or truncated on \00, \r, \n, etc.. You'd have to figure out what characters to escape (and unescape). But I'd try passing a byte array instead.
07-30-2019 05:11 AM
Hi Wiebe,
Passing DXF as String to Python is working.There was a parsing problem from Python side.Now it is fixed.
Thanks for helping me out.