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

Script esterno autocad?

  • Thread starter Thread starter sdagonfo
  • Start date Start date

sdagonfo

Guest
Good morning.
today I had the need to create a script for autocad with the following functions; (using the "creascript.xls" file on the site)

1. open drawing1.
2. select "layer1", "layer2".
3. copy basic point 0.0.0
4. close drawing.
5. open drawing2.
6. glue 0.0.0.
7. select the two layers glued and set in black color (7).
8. move to the right of tot mm.
9. purge all.

I would be very grateful if any of you could help me write it, because I don't know all the autocad commands.
 
I had to edit the createfilescript.xls file to adapt it to your request, virtually every file occurrence in the command list increases the file name index.
the shift to the right you get it directly pasting, instead of 0.0 you just need to change the coordinate x
 

Attachments

ostment on the right you get it directly pasting instead of 0.0 you just need to change the coordinate x
First of all I thank you for the time you have dedicated to this script, it will certainly be very useful both to me and to my colleagues.
Everything works, only that I have to find a way to move the content of the two layers to the desired point, I will think about it in the following days, since the location is dynamic (the content has different coordinates for each dwg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 
I had to edit the createfilescript.xls file to adapt it to your request, virtually every file occurrence in the command list increases the file name index.
the shift to the right you get it directly pasting, instead of 0.0 you just need to change the coordinate x
would you know if there's a way to create a script even to defrost all layers in a drawing, select all of them and put them on line all the time? Thank you again.
 
If you had to do it as a keyboard, how would you do it?
a script is simply the exact sequence you would give from keyboard to carry out a series of operations, only that is written in an external file. .
 
If you had to do it as a keyboard, how would you do it?
a script is simply the exact sequence you would give from keyboard to carry out a series of operations, only that is written in an external file. .
This is clear to me, I can very well perform keyboard commands, but for example in this case, I will write the following script:
Selez
everything
prop

once I come to prop, how do I select "line type" and give it continues?, i.e. how do I interact with autocad without the command line? .
Thank you.
 
(command "_layer" "_t" "*"") destroy all plans
(command "_layer" "_l" "continuous" "*"") set line type
 
(command "_layer" "_t" "*"") destroy all plans
(command "_layer" "_l" "continuous" "*"") set line type
I am running these two commands with the script, which seem to be very useful since I have to do this job for 400 files and passes.
Thank you!
 
(command "_layer" "_t" "*"") destroy all plans
(command "_layer" "_l" "continuous" "*"") set line type
hi, I was checking now some files on which I ran the command, and the lines were not changed, I tried out of curiosity to run it on a single file and in fact it does not work.. What can I do?
 

Attachments

  • Immagine.webp
    Immagine.webp
    18.9 KB · Views: 1
with (command "_layer" "_l" "continuous" "*"") change the typeline in the planes, if qulcuno designed entities using a typeline different from bylayer you do not get any change.

(command "_change" "_all" "_pr" "_lt" "_bylayer"") sets the bylayer typeline to all drawing entities.

(command "_change" (ssget) "_pr" "_lt" "_bylayer"") sets the bylayer typeline to all selected entities.
 

Forum statistics

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

Members online

No members online now.
ciao
Back
Top