LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading DXF file in LabVIEW

Solved!
Go to solution

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.

0 Kudos
Message 1 of 9
(3,046 Views)

Hi,

 

dou you want to pass the data as bytes or as text?

 

Regards,

Kevin

0 Kudos
Message 2 of 9
(3,008 Views)

Pass the bytes (array or string), or pass the path (string).

0 Kudos
Message 3 of 9
(2,985 Views)

Hi,

 

please have a look at the attached VI. It extracts bytes from the file and you could pass them to python.

 

Regards,

Kevin

0 Kudos
Message 4 of 9
(2,957 Views)

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.

0 Kudos
Message 5 of 9
(2,908 Views)

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.

 

0 Kudos
Message 6 of 9
(2,902 Views)

@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...

0 Kudos
Message 7 of 9
(2,896 Views)

@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.

0 Kudos
Message 8 of 9
(2,895 Views)
Solution
Accepted by wiebe@CARYA

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.

0 Kudos
Message 9 of 9
(2,890 Views)