Hello,
is there a way to Read XYZ curve data into CorelCAD. I am running CorelCAD 2014 and would like to import a 3d-curve data points into the program.
Many thanks!
Hi,
one of the possible ways is to use AutoLISP routine.
Look at this solution:
http://www.cadforum.cz/cadforum_en/qaID.asp?tip=194
Maxim
Hi thanks for the suggestion... this is a LSP (lisp) file. Forgive me, I am a novice to LISP and how it is used in CorelCAD. Is there a place I could read how to use this lsp file. Thanks!
I looked into the .lsp file you suggested. It looks like a python code :) It need a compiler to run this script. What is the name of the compiler; is it free for download. Many thanks
You don't need a compiler to run AutoLISP routine, because application compile it "on the fly".
In order to run routine you need to load it first with APPLOAD command. Type APPLOAD at the command window, and hit Enter, you will be prompted to select .lsp file - browse to the location where you saved ascpoint.lsp and select it, click OK, you will see:
LOADAPPLICATION
ASCPOINT.LSP Copyright 1990-1997 Tony Tanzillo, mods by CAD Studio
Use ASCPOINT to import coordinates.
Use WPOINT to export POINT coordinates.
...../ascpoint.lsp successfully loaded
Now you can use new command ascpoint to import point coordinate data from ASCII files in CDF or SDF format.
Here are details (from ascpoint.lsp) how to use:
ASCPOINT.LSP is a utility for use with AutoCAD Release 10 or later,
which reads coordinate data from ASCII files in CDF or SDF format,
and generates AutoCAD geometry from the imported coordinates.
The ASCPOINT command will read coordinate data from an ASCII file,
and generate either a continuous string of LINES, a POLYLINE, a
3DPOLYline, multiple copies of a selected group of objects, or
AutoCAD POINT entities.
Format:
Command: ASCPOINT
File to read: MYFILE.TXT <- ASCII input file
Comma/Space delimited <Comma>: Comma <- data format
Generate Copies/Lines/Nodes/3Dpoly/<Pline>: Nodes <- entity to create
Reading coordinate data...
If you selected "Copies", then ASCPOINT will prompt you to select the
objects that are to be copied. The basepoint for all copies is the
current UCS origin (0,0,0). One copy of the selected objects will be
created for each incoming coordinate, using each coordinate as the
displacement relative to the origin.
A comma-delimited (CDF) ascii file contains one coordinate per line,
with each component seperated by a comma, like this:
2.333,4.23,8.0
-4.33,0.0,6.3
0.322,5.32,0.0,attribute1,attribute2
etc....
There should be no spaces or blank lines in a CDF coordinate data file.
A space-delimited (SDF) ascii file contains one coordinate per line,
with each component seperated by one or more spaces, like this:
2.333 4.23 8.0
-4.33 0.0 6.3
0.322 5.32 0.0 attribute1 attribute2
...
Coordinate data can be 2D or 3D.
Note that all numeric values must have at least one digit to the left
and the right of the decimal point (values less than one must have a
leading 0), and a leading minus sign indicates negative values. This
applys to both CDF and SDF formats.
ASCPOINT can generate a continuous chain of LINE entities from your
coordinate data, where each pair of adjacent lines share a coordinate
from the file.
ASCPOINT can also generate a polyline or 3DPOLYline from the coordinate
data, where each point in the file becomes a vertice of the polyline.
If the input file contains 3D coordinates, and you specify a polyline,
then the Z component is ignored and the default of 0.0 is used.
ASCPOINT will also COPY a selected group of objects, creating one copy
for each incoming coordinate, and using the coordinate as the absolute
copy displacement from the CURRENT UCS origin (0,0,0).
Finally, ASCPOINT will generate AutoCAD POINT entities from the data in
the file. Specify the point size and type prior to invoking ASCPOINT.
Writing POINT coordinates to file:
The WPOINT command also included in this file, will export the
coordinates of selected POINT entities to a comma-delimited CSV
file that can be read into Excel, and imported using ASCPOINT.
I tested this routine and it works fine.
Maxim, thank you for your detailed reply. Is there a way for me to click "Thanks" or give you rating on this forum. Your posts have been very helpful.