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

cart compilation cartiglio

  • Thread starter Thread starter michelamik
  • Start date Start date

michelamik

Guest
Hello, everyone.
I need your help politely.
I have to create a macro that automatically fills the cartilage of each table (I have 300!), with the data inserted in a excel.
I have arranged the cartilage with attributes and I have to fill in with the relative data present in a sheet excel (processed list).
is it possible to create a macro like this? so that if they change the data in excel they change the files.
Thank you very much!!!!
I have attached the files I use and you have to talk.
 

Attachments

a script could be enough.
within the forum there is an excel file that automatically generates the script for each file. is an argument already treated and explained
the operation of the script is to launch in sequence the commands that would be compiled in the command line.
below a mirror of what you should fill out, but first a brief explanation of the mirror:
in red the commands to write in each single cell; where quotes are kept
(in brackets the explanation)
commands preceded by the underscore serve to give command line options instead of opening the selection window
-comment at the margins of this example-
Open the door (apre un file)"file.dwg path" (file name to open; the quotes serve for long names and with spaces)_attet (edita il blocco)_n (defines if editing attributes singularly)_n (defines if editing only visible attributes)"paper" (block name containing attributes to edit)"label" (tag name to edit)* (corresponds to any string and can be used anywhere in the search string)value old (steel to change)new value (new string)
-respect by _attedit for each label-zoom (soom)e (zoom estensione)
_ purge (pulisci il file)tu (all objects)* (any object)_n (does not check objects individually)
- these commands are optional-_save (tin)
 
thanks massive for the suggestion. I also have the same problem, I will try to adapt your directions to my case
 
a script could be enough.
within the forum there is an excel file that automatically generates the script for each file. is an argument already treated and explained
the operation of the script is to launch in sequence the commands that would be compiled in the command line.
below a mirror of what you should fill out, but first a brief explanation of the mirror:
in red the commands to write in each single cell; where quotes are kept
(in brackets the explanation)
commands preceded by the underscore serve to give command line options instead of opening the selection window
-comment at the margins of this example-
Open the door (apre un file)"file.dwg path" (file name to open; the quotes serve for long names and with spaces)_attet (edita il blocco)_n (defines if editing attributes singularly)_n (defines if editing only visible attributes)"paper" (block name containing attributes to edit)"label" (tag name to edit)* (corresponds to any string and can be used anywhere in the search string)value old (steel to change)new value (new string)
-respect by _attedit for each label-zoom (soom)e (zoom estensione)
_ purge (pulisci il file)tu (all objects)* (any object)_n (does not check objects individually)
- these commands are optional-_save (tin)
hello Masses and thanks to your availability. I understood the meaning and use of scripts, the problem is that the script should open the excel file where to read which file to open and for each of these read what values to give to the attributes of the block. I don't know how to get him to do this. Could you give me some indication? Thank you.
 
the excel serves to create the script, not vice versa.
on autocad you study the commands and any options of these to use, you make the list, open the file crescript (I put it for the 50th time...) and follow the instructions so create the scan file that you will then load in autocad.
I recommend you always try the code with a single design that you made a security copy to verify that it works as you want. if everything works you can throw even 1000 drawings and get you to do something else.

in this debate find a pdf file with explanation, examples and script tips
 
Last edited:
the excel serves to create the script, not vice versa.
on autocad you study the commands and any options of these to use, you make the list, open the file crescript (I put it for the 50th time...) and follow the instructions so create the scan file that you will then load in autocad.
I recommend you always try the code with a single design that you made a security copy to verify that it works as you want. if everything works you can throw even 1000 drawings and get you to do something else.
Of course, I only understood that it was hundreds of files I would rather not write a script with the names of all files. Conceptually I imagined using a tool that read me from an excel file on each row in order:
- file name to open
- attribute value 1
- attribute value 2
- ...
this reiterated for an indefinite number of rows.
Now I don't know what way to go through to develop (script, vba, lisp). according to your experience should I put my attention?
 
and what changes you even if they are 500 files? you write the list of commands, upload the files and launch the command and do all the excel.
if instead for each dwg file the attributes change without a precise logic that allows to exploit the functionality of excel the situation is different.
 
cer
if instead for each dwg file the attributes change without a precise logic that allows to exploit the functionality of excel the situation is different.
Of course they change, that's the difficulty!
for each autocad file in the cartiglio change at least:
- the coding of the processed
- title and subtitles
- the date of issue
I hope I explained.
 
If you already have a compiled excel with all the variables of attributes and want to interface to this file it seems to me, I'm not sure, that you need to program in vba.
I can only struggle with scripts
 
If you already have a compiled excel with all the variables of attributes and want to interface to this file it seems to me, I'm not sure, that you need to program in vba.
I can only struggle with scripts
I suspected the only way was the vba. I'm going to study it. Thank you
 

Forum statistics

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

Members online

No members online now.
Back
Top