Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert a dxf file to xml fifle with CAD.xsd

Hello~ I have generated a test vi by motion asistant, but I found that the VI can only input with xml format file. My CAD files are all dxf format for kinds of models. Therefore, I have to write a VI to convert dxf to xml. How can I do that?Can anyone give me some suggestions? I have searched forum and found Labview creates the xml file comply with CAD.xsd shema, but I don't know how to use that shema. The tutorial is : http://zone.ni.com/devzone/cda/tut/p/id/3718#toc2 Please help me. Thanks a lot.
0 Kudos
Message 1 of 8
(12,591 Views)
Any Comment? I have searched NI's forums for a long time,but didn't find the answer. I found lots of people want to control their motors through CAD profile(like dxf file). They also want to show their dxf profile on the labview front panel for the user to check. I think that if we can do this for the end users and meet their demand. That would be great in motion control field with labview platform.
0 Kudos
Message 2 of 8
(12,581 Views)
Hi Ann_881, Have you ever try NI's Motion Assistant? This software can let you load dxf files into motion system. Please refer to below web page. NI Motion Assistant Taking CAD Profiles To Motion In Minutes http://zone.ni.com/devzone/cda/tut/p/id/3718 Shawn Huang
Message 3 of 8
(12,565 Views)
Hi Shawn Thanks for your response. I have tried Motion assistant and I knew I could load DXF file as CAD profile. But when I generated Labview code from Motion Assistant, I found the code could only been imported xml format file. I studied DXF format and wrote a vi to get the profile inormation I need,so my problem was solved. The link for DXF format definition: http://www.wotsit.org/list.asp?search=dxf&button=GO! Regards, Ann
0 Kudos
Message 4 of 8
(12,514 Views)

hi anna can i have you email please because i have some difficulties in exchanging a dxf file into xml file . 

0 Kudos
Message 5 of 8
(10,299 Views)

Usually dxf file has nothing to do with xml file.

Can you explain why you want to do such a rare application?

There sould be a more appropriate solution for your application instead.

0 Kudos
Message 6 of 8
(10,287 Views)

Hi , well my application consist on commanding a CNC machine and my problem is how to convert DXF files ( containing the form of object I need to have finally) into xyz coordinate so that finally I can command my motor to move in the right directions. The problem I found is that usually DXF files are 2D drawings and have no z coordinate. So i tried to convert a dxf file using NI-Motion Assistant and LabVIEW. After conversion, I found that one of the inputs of the sub-VI movement control is an xml file. Said so, motion assistant simply turns a dxf file in XML and use the result of a standard VI  control. So, I did a little research on the dxf-xml conversion.  I wound be grateful for any help. 

0 Kudos
Message 7 of 8
(10,255 Views)

Hi,

 

According to the following document, it seems there must be some specific conversion done by motion assistant when generating LabVIEW code, in order to parse the DXF file into a XML which complies with a specific schema.

http://www.ni.com/white-paper/3718/en/#toc5

I believe that Ann must have made some effort to study both file formats and to build a vi doing this conversion, yet I think this would so far be the best chance we can have.

The DXF file information is provided in the Ann's latest post, and the XML schema is located in the <Motion Assistant>\bin\mxwPlugins\XMLSchema\CAD.xsd.

0 Kudos
Message 8 of 8
(10,217 Views)