Jump to content

Excell extraction


gwatkinsr

Recommended Posts

Is there a way to extract a series of X & Y coordinates from an excell spread sheet and bring that information into AutoCAD and use it to generate saseries of lines?

Link to comment
Share on other sites

It takes a little effort, but you could do that by setting up a seperate Excel worksheet with all the commands, and look-up the varibles you need.

 

The first column is the command, the next is the first bit of info the command needs, next column is the next one, etc.

 

ie- Line | X, Y, Z | @dist

 

Excel permits you to take info from one cell and add it to another, so X,Y,Z would be coming from three different values brought together into one cell.

 

Then save the page as on of the TXT formats (tab-delimiated text, or MS-DOS text, I think, but it's been a long time since I've done it), touch it up, change the TXT to SCR and run that text file as a script.

 

Just remember, a space in a Script is like using the enter key. An enter Key used in the script is ALSO like an enter key. Hitting enter twice can restart a command. Each time you start a new line (left to right) you're hitting enter. Every time you change cells you're adding a space.

 

I've done this with a complex drawing, as part of an experiment to see if I could write a program to do my drafting for me. The answer was Yes and No.. There were decisions that had to be made by a human, by they were still a pretty cool set of drawings, and fun to watch them generate.

 

That was "old cad" though.. I keep hearing stuff about scripts being dropped from certain versions, etc, and it's possible that script support has changed, so I don't know if it'll work like that now.

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...