Console - Batch Save Layer State

Console - Batch Save Layer State

Anonymous
Not applicable
1,045 Views
10 Replies
Message 1 of 11

Console - Batch Save Layer State

Anonymous
Not applicable

Hey all,

 

I know this should be a simple one and may have been asked in some form before, but I have a over 200 drawings I need to prepare by creating a layer state before I bind them and am hoping to do this through a batch method of running script commands on each drawings. However my problem is I although the commands to do this: -Layer, A, S, "Name" then something like QSAVE, QUIT should work it will instead get to the point after saving the layer state and then just ask for the what settings I want to toggle on/off. I basically don't want to do anything here as I want to keep everything on and just save and quit, however I cannot find a way of cancelling out of this through a script, or I would rather just skip that part completely.

 

So does anyone have any suggestions or a better way to do this please? 🙂

 

Thanks.

Accepted solutions (1)
1,046 Views
10 Replies
Replies (10)
Message 2 of 11

Victoria.Studley
Autodesk
Autodesk

Hi @Anonymous,

 

Thank you for posting your question here. This topic might receive more responses in the AutoCAD Customization forum, where other users who frequently script will see it.

 

I'll move the topic over there for you.


Victoria Studley
Principal Experience Designer - Fusion Configurations
Join us in the Fusion Insider Program
Fusion Learn & Support | Fusion Documentation
0 Likes
Message 3 of 11

Anonymous
Not applicable

Aha thank you, that is a good point so I will hope so 🙂

0 Likes
Message 4 of 11

hmsilva
Mentor
Mentor
Accepted solution

@Anonymous wrote:

Hey all,

 

I know this should be a simple one and may have been asked in some form before, but I have a over 200 drawings I need to prepare by creating a layer state before I bind them and am hoping to do this through a batch method of running script commands on each drawings. However my problem is I although the commands to do this: -Layer, A, S, "Name" then something like QSAVE, QUIT should work it will instead get to the point after saving the layer state and then just ask for the what settings I want to toggle on/off. I basically don't want to do anything here as I want to keep everything on and just save and quit, however I cannot find a way of cancelling out of this through a script, or I would rather just skip that part completely.

 

So does anyone have any suggestions or a better way to do this please? 🙂

 

Thanks.


Hi jwilde,

using AcCoreConsole we don't need to use the quit command in the .scr file,

exemple for .scr file

-layer
a
s
StateName
<empty line/enter>
<empty line/enter>
<empty line/enter> qsave
<empty line/enter>

 

Hope this helps,
Henrique

EESignature

Message 5 of 11

Anonymous
Not applicable

Thank you! I will give this is a try later. Hopefully the right amount of <empty line/enter> will exit out of the toggle on/off section and allow me to QSAVE as you suggest.

0 Likes
Message 6 of 11

Anonymous
Not applicable

That worked perfectly 🙂 Although it seems to run the QSAVE twice by the looks of the console report, but that doesnt matter much. Will save me much time in the future thank you. Now if there was just a way of binding all the XREFs in at the same time...although ETRANSMIT seems equally useful for that... 🙂

 

Thanks again!

0 Likes
Message 7 of 11

hmsilva
Mentor
Mentor

@Anonymous wrote:

That worked perfectly 🙂 Although it seems to run the QSAVE twice by the looks of the console report, but that doesnt matter much. Will save me much time in the future thank you. Now if there was just a way of binding all the XREFs in at the same time...although ETRANSMIT seems equally useful for that... 🙂

 

Thanks again!


You're welcome, jwilde
Glad I could help!

 

Regarding the 'run the QSAVE twice' please make sure that there is only one empty space after the 'qsave', if there are two spaces, the command will be called twice...

Henrique

EESignature

0 Likes
Message 8 of 11

Anonymous
Not applicable

Quite right and corrected now thanks. Not wanting to push my luck as you have already been helpful enough and this likely deserves another topic but...any experience or ideas on using -ETRANSMIT through the console? Seems to not recognise that command so wondering it is just not possible that way...

0 Likes
Message 9 of 11

hmsilva
Mentor
Mentor

@Anonymous wrote:

Quite right and corrected now thanks. Not wanting to push my luck as you have already been helpful enough and this likely deserves another topic but...any experience or ideas on using -ETRANSMIT through the console? Seems to not recognise that command so wondering it is just not possible that way...


jwilde,

from  Kean Walmsley's ACConsole list of commands, -ETRANSMIT is one of those...

 

I don't have AutoCAD in this laptop... I can't test it... maybe later

 

Henrique

 

EESignature

0 Likes
Message 10 of 11

hmsilva
Mentor
Mentor

@Anonymous wrote:

Quite right and corrected now thanks. Not wanting to push my luck as you have already been helpful enough and this likely deserves another topic but...any experience or ideas on using -ETRANSMIT through the console? Seems to not recognise that command so wondering it is just not possible that way...


Sorry,

I was writing -ETRANSMIT but I was thinking of -PUBLISH, my bad!

 

-ETRANSMIT is not one of those commands....

 

Henrique

EESignature

0 Likes
Message 11 of 11

Anonymous
Not applicable

Thanks for checking, I didnt see it there either, so will assume it is not possible through the console. That is fine however, it doesn't take much longer to do it thought ACAD instead. Thanks again 🙂

0 Likes