Michael Yoh

Importing .txt files of non-standard format into SolidWorks.

Discussion created by Michael Yoh on Oct 4, 2020
Latest reply on Oct 4, 2020 by Paul Salvador

When trying to import a .txt file into SolidWorks CAD, typically the file would just be formatted as XYZ coordinates without headings or commas, or anything else besides lines of space-separated XYZ coordinates in each line.

 

I have some txt files that I'd like to get into Solidworks, but the lines are written in this format:

 

"

#754=AXIS2_PLACEMENT_3D('Circle Axis2P3D',#752,#753,$) ;
#767=AXIS2_PLACEMENT_3D('Torus Axis2P3D',#764,#765,#766) ;
#771=AXIS2_PLACEMENT_3D('Circle Axis2P3D',#769,#770,$) ;
#784=AXIS2_PLACEMENT_3D('Plane Axis2P3D',#781,#782,#783) ;
#792=AXIS2_PLACEMENT_3D('Circle Axis2P3D',#790,#791,$) ;

"

 

There are just hundreds of thousands of lines like the five I pasted in above, which I randomly selected as examples, and I really wouldn't know where to start when it comes to getting the files into the typical importing format, so I'm stuck at the moment. Does anyone have an idea on how I'd get these sort of text files into SolidWorks CAD, or is this just a lost cause?

 

Thanks! I've attached the files just in case someone might need to take a look at them for reference.

Outcomes