Jump to content

Link Autocad to external file


fcporto

Recommended Posts

Hello,

 

Does anyone know how can i do a autolisp rotine that links the layers of the dwg file to an external file like txt or excel?

So that we can for instance change the color of its layer in the dwg according to two columns in the external file, the first one with the layer name and the second on with its' future color.

 

Best regards

Link to comment
Share on other sites

Can be done pretty easy we had a txt file that contains the info

 

1234567890123456789012345678901234567890

Newname nickname Col LineType

brick--1 brick--1 1 continuous

ceiling--2 ceiling--2 6 continuous

ceiling--3 ceiling--3 6 continuous

ceiling--5 ceiling--5 6 continuous

 

The new name is the layer name, the nickname is the variable name within a lisp program this was done so a lisp program works without ever actually knowing the layer name a client wants. This was a commercial product hence clients changed the text file.

 

In turn the lisp writes a script file after reading the text file which changes the layers properties or creates new layers.

 

The layer setup would normally be ran as a first command or at any time if you realised wrong answers were being used but its just a small part of an overall package.

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