LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert an autocad file to co-ordinates

Hi,
 
How to convert an autocad dwg or dxf file to txt file containing co-ordinates, using labview.
 
Regards,
Giridhar Rajan
Automation Engineer, Design
Cruiser Controls
Mumbai, India
0 Kudos
Message 1 of 5
(3,793 Views)

Hello,

 

 

 

I think you have a couple options – neither of which is likely to be easy.  One option is to find some other program which does that for you (you mention needing to use LabVIEW, but you might be able to call a third party program to do it for you).  Another option is to see if autocad has an automation server and make calls to autocad to extract each object’s coordinates and write those to file (you’ll have to check up on the documentation of autocad about this).  The other option is to convert the files to some sort of image file using non-NI software (such as autocad or a conversion program) and use the image VIs to discover where various objects are and convert those.  This will likely not be easy either though….  I think your best bet is going to be finding some way to make calls to autocad to get the coordinates of all the objects in the file using ActiveX (if it is capable of that).

 

 

 

Sorry I don’t have more info for you – best of luck though!

 
Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 2 of 5
(3,776 Views)
I'm not sure exactly what you mean. A dxf file is a text file with coordinates. What exactly are you trying to convert from/to?
0 Kudos
Message 3 of 5
(3,776 Views)

Hi,

Basically i'm trying to give motion commands to NI PCI7344, 4-axis motion controller by acquiring an image from autocad. I have a dxf file. It contains so many things like headers etc. which complies to AutoCAD Dxf file format specifications. I want to extract only the co-ordinates part of it and want it in a text file in this manner,

x100 y20 z40

x100.1 y19.8 z39.9.....and so on,

so that I can parse this string and give the X,Y and Z values as commands to the motion controller. Any suggestions??

I had one more idea. Can I give an interface in LabVIEW itself, such that the user can draw the 3-D figure in labview, so that I can simultaneously tap the co-ordinates in a cluster of three elements, i.e. X,Y and Z. May be, the user can click a set button to record the co-ordinates at a particular instant. And when the user is done with the drawing, he can click save, to save the drawn profile into a file. But how to go about it. Can I use a 3-D graph?? Please suggest.

Regards,

Giridhar Rajan
Automation Engineer, Design
Cruiser Controls
Mumbai, India
0 Kudos
Message 4 of 5
(3,763 Views)
This is exactly what I need to do. Did you ever have any luck figuring it out?
0 Kudos
Message 5 of 5
(3,451 Views)