This article explains the steps to take XYZ data from a spreadsheet or existing text file (See Figure #1) and turn it into a script that we can then import into DraftSight. This is beneficial because DraftSight and programs like it will handle large amounts of data very well and allow you to visualize the data before trying to import it into other applications like SOLIDWORKS.
Figure #1 – Spreadsheet & Text File Data Examples
If you have this as a spreadsheet, you can export it to a CSV (comma delimitated) file. If this is a text file you may have to either add the commas or import them into a spreadsheet and then back out depending on the amount of data.
Once you have the data in a CSV file, you need to open it in a text editor (Notepad ++ for example) and then add two lines to the top of the file. “POINT” to the first line, and “M” to the second line which tells DraftSight what the entities are in the file below (See Figure #2).
Figure #2 – Modified Data File
Once you have the file edited and saved. Then close out of the text editor and open Windows Explorer. Then rename the file from “SampleXYZ_Script.txt” to “SampleXYZ_Script.scr”. Then go in DraftSight and on the Manage tab select “Run Script…” (See Figure #3).
Figure #3 – DraftSight – Manage tab | Run Scirpt…
Then select the script file (See Figure #4).
Figure #4 – DraftSight – Open Script File
Once it runs, it will show the points on the screen and also show the command that ran from the script (See Figure #5).
Figure #5 – DraftSight – Result of Script Being Ran
Now you can verify/review the data and then either work with it in DraftSight or import this into another CAD application to work with the data.
DraftSight and SOLIDWORKS PDM: Getting Started
DraftSight to PDF Conversion Task Installation with SOLIDWORKS PDM Professional
About GoEngineer
GoEngineer delivers software, technology, and expertise that enable companies to unlock design innovation and deliver better products faster. With more than 40 years of experience and tens of thousands of customers in high tech, medical, machine design, energy and other industries, GoEngineer provides best-in-class design solutions from SOLIDWORKS CAD, Stratasys 3D printing, Creaform & Artec 3D scanning, CAMWorks, PLM, and more
Get our wide array of technical resources delivered right to your inbox.
Unsubscribe at any time.