Jump to content
clark

Import xyz data/Draw 3D drawing

Recommended Posts

clark

Hello everybody,

I have following xyz data (in *.txt format) as *.xyz format.

1.Is it possible to import .xyz file for AutoCAD

2.How can I draw 3D drawing using this xyz data. I mean , is there any direct command to do this?

text file.txt

Share this post


Link to post
Share on other sites
fuccaro

What kind of "3D drawing" are you thinking about? Points? a 3DPolyline?

Possible it can be achieved with a few clicks and copy/pasting the data in the command line

Share this post


Link to post
Share on other sites
fuccaro

I created this inserting points at the coordinates. It took me about 5 minutes. The file needed some small adjustments, to have the x,y and z separed by commas instead of tabs. Using Find/replace in Notepad it did it automatically (Ctrl+H). After that copy the whole text in the clipboard (Ctrl+A, Ctrl+C)

In AutoCAD turn off the running Osnap (F3) and enter in the command line MULTIPLE(enter)POINT(enter)

Click in the command line and paste the data (Ctrl+V)

points.gif

Share this post


Link to post
Share on other sites
shift1313
Hello everybody,

I have following xyz data (in *.txt format) as *.xyz format.

1.Is it possible to import .xyz file for AutoCAD

2.How can I draw 3D drawing using this xyz data. I mean , is there any direct command to do this?

 

 

If you open the file in Excel, save it as a comma deliniated file, reopen in notepad, add the line 3dpoly before your first number and save the file as a .scr(just save as then type in your file name with the .scr after).

 

in acad type script in the command line, look for your file and run.

 

Added an image showing you what your file should look like. The script command in acad will allow you to run through a script file. The first command(3dpoly) will start the 3d poly line command. Each number after that will be inserted as a coordinate. The first number as X, the comma ends the X coordinate and starts the Y and so on. If there are spaces it will end which is why space or tab deliniated wont work.

script.JPG

Share this post


Link to post
Share on other sites
clark
If you open the file in Excel, save it as a comma deliniated file, reopen in notepad, add the line 3dpoly before your first number and save the file as a .scr(just save as then type in your file name with the .scr after).

 

in acad type script in the command line, look for your file and run.

 

Added an image showing you what your file should look like. The script command in acad will allow you to run through a script file. The first command(3dpoly) will start the 3d poly line command. Each number after that will be inserted as a coordinate. The first number as X, the comma ends the X coordinate and starts the Y and so on. If there are spaces it will end which is why space or tab deliniated wont work.

 

Dear fuccaro and shift,

 

Thnaks a lot.I tried it boath ways.Both are working very well.

I have one question.Can I see output as 3D view.I tried it using 3D orbit.It seems plat.

cad.jpg

Share this post


Link to post
Share on other sites
eldon

It is looking flat because it is nearly flat. The z values are much smaller compared to the x,y values. Try multiplying the z values by 10 before you import the data. :)

Share this post


Link to post
Share on other sites
clark
It is looking flat because it is nearly flat. The z values are much smaller compared to the x,y values. Try multiplying the z values by 10 before you import the data. :)

 

Yes eldon, you are correct.Thanks

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...