• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

string syntax for inserting series of blocks with attributes from excel to autocad

  • Thread starter Thread starter nr000
  • Start date Start date

nr000

Guest
good evening to all, I would like to create a more or less automated procedure to insert blocks (when defined on cad) starting from a table of excels specifying xyz position, scale, rotation and attributes.
with the 2018 version I could do it by copying from excel and pasting in the command line a series of strings of the type 1563125951341.webpin which the command is _insert (hidden in figure), the block name is block1, to follow there are coordinates, scale factors and rotations and finally the p000x terms that represent the value of the attributes.
with the 2020 version, however, while using the same file with the same block definition, the insertion of the attribute value no longer automatically takes it from the string but makes the attribute (for each string) appear manually. Obviously with a table of hundreds of rows this makes the procedure unavailable and useless.
Does anyone know what has changed from 2018 to 2020? and how to overcome the problem?
even better, did someone develop a better automated procedure?

Thank you all! !
 
Thank you, it was the attdia system variable.
You were very kind! It remains the fact that my procedure is very rough and "artistic" and it would need to be refined. For example, it manages to insert the blocks on the right coordinates only if the zoomed area is narrow enough, otherwise it places them in line without respecting the coordinates....
if you have to suggest something (like if you should turn to macro vba, script, lisp, etc...) are open to all suggestions.
Thanks again!!!
 
in the forum there is an excel sheet that generates script files. search createscript.xls file (not load because having been published in several discussionoi you will surely find tips on how to use it)
the operation is very intuitive: in each row you enter the command that you would write in autocad then you entered or the dwg files to which to apply it and generate the file.
the rognose part is to correctly insert the commands
As you already have data in excel you can use it to automatically fill out the fields that require values.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top