Macro command for plot in model.

Macro command for plot in model.

NASHARUDINC8MF7
Participant Participant
1,086 Views
15 Replies
Message 1 of 16

Macro command for plot in model.

NASHARUDINC8MF7
Participant
Participant

Hi.

I want to make macro command to save by 1 click.

After we press Ctrl+P, the plot model will popup, and we need to click the windows option to make a selection an area we want to plot.

I want to bypass the 1 time click on the window < option. Is it able to do?

If yes, could please share the command.

0 Likes
Accepted solutions (2)
1,087 Views
15 Replies
Replies (15)
Message 2 of 16

pendean
Community Legend
Community Legend
What are your other plot parameters please?

BTW, did you know you could master creating your own macro yourself with just a little time: practice using the -PLOT command (there is a dash i the name that you can type), work out all the details you want and if you still need it we can help you finish writing that macro.
0 Likes
Message 3 of 16

NASHARUDINC8MF7
Participant
Participant
i don't use layout for plot. Since there are alot of drawing revision in one dwg file, i just use model so i can choose which revision i want to plot.

plot parameters means its a fix position to plot right, i don't want a fix parameters.

the command i use right now (^C^C_PLOT;Y;;Window;Y;), its not working, i still need to click the windows < icon to before i select area to plot. i just want to skip the 1 time click on windows < icon .

If possible, its great if you can share the macro.

0 Likes
Message 4 of 16

cadffm
Consultant
Consultant

Hi,

create it by yourself. AutoCAD will wait for one-user-input, if you are add a backslash to your macro!

 

Figure out the macro up to the point -plot ask for the first coordinate, then add \ for the first, and if -plot ask for the second windows coordinate, add another \

and add the rest of the macro..

It's easy, but step by step.

Sebastian

Message 5 of 16

paullimapa
Mentor
Mentor

you're missing lots of information in your plot macro even before getting to the Window option:

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/How-to-print-a-lay...

The link provides an example that plots to area of Extents but in a Layout and Not Model:

paullimapa_0-1727915720495.png

But notice the way to see how to proceed with editing the macro as shown in the same link:

paullimapa_2-1727915884572.png

I would also suggest while in Model tab set FILEDIA to 0 and CMDDIA to 0.

Then enter -PLOT command and go through the command line prompts and set your macro that way.

Then afterwards remember to set FILEDIA back to 1 and CMDDIA back to 1.

 

 

 

 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 6 of 16

NASHARUDINC8MF7
Participant
Participant

I want to bypass the click on that windows icon.

 

NASHARUDINC8MF7_0-1727933096767.png

When i use this command (original was Extents, changed to window)

^C^C_zoom;e;-PLOT;Y;;DWG to PDF.pc3;ISO A1 (841.00 x 594.00 MM);Millimeters;Landscape;no;window;fit;Center;Yes;.;Yes;;Yes;Yes;;No;Yes

 

it did stop on window, however i need to continue choose the things after that (fit,center etc) . 

how can i break the code until window, so i don't need to choose the next things?

0 Likes
Message 7 of 16

paullimapa
Mentor
Mentor
Accepted solution

@cadffm already provided you with the answer to your question.

For the macro to pause so that you can select the first window coordinate add a \ 

Then for it to pause to select the second window coordinate add a \ again

Try it like this:

^C^C_zoom;e;-PLOT;Y;;DWG to PDF.pc3;ISO A1 (841.00 x 594.00 MM);Millimeters;Landscape;no;window;\\fit;Center;Yes;.;Yes;;Yes;Yes;;No;Yes

You can read more about using the back slash as a pause for user input here:

Command macro cannot select multiple objects in AutoCAD LT (autodesk.com)


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 8 of 16

NASHARUDINC8MF7
Participant
Participant

Yes this one is working like a charm.

Thanks alot.

Just need to change a bit about the code, i change like this. Then i get what i want.

 ^C^C_zoom;e;-PLOT;Y;;DWG to PDF.pc3;ISO A1 (841.00 x 594.00 MM);Millimeters;Landscape;no;window;\\fit;Center;Yes;.;Yes;;Yes;Yes;;Yes

0 Likes
Message 9 of 16

paullimapa
Mentor
Mentor

very good...looks like you've got down the plot sequence for the Model tab which is slightly different than the Layout tab given in the previous example...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 10 of 16

NASHARUDINC8MF7
Participant
Participant

Im sorry, one more things, everything works fine, accept the pdf file is named as Yes.Pdf

How can i save it as original filename of any dwg file?

0 Likes
Message 11 of 16

paullimapa
Mentor
Mentor

Try this change based on the sequence of prompts I'm seeing with -PLOT:

^C^C_zoom;e;-PLOT;Y;;DWG to PDF.pc3;ISO A1 (841.00 x 594.00 MM);Millimeters;Landscape;no;window;\\fit;Center;Yes;.;Yes;A;;Yes;Yes;

paullimapa_0-1727936192269.png

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 12 of 16

NASHARUDINC8MF7
Participant
Participant

I don't really know what the problem just now, a bug i guess. 

I'm still using the same command as above. After i restart autocad, it's all working fine.

Sorry for that. 

0 Likes
Message 13 of 16

NASHARUDINC8MF7
Participant
Participant

Got another things coming up, can i use this same macro and i want to choose the pdf location.

For now, it will save on the same folder at the dwg file itself.

0 Likes
Message 14 of 16

paullimapa
Mentor
Mentor
Accepted solution

try this:

^C^C_zoom;e;-PLOT;Y;;DWG to PDF.pc3;ISO A1 (841.00 x 594.00 MM);Millimeters;Landscape;no;window;\\fit;Center;Yes;.;Yes;A;~;Yes;Yes;

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 15 of 16

NASHARUDINC8MF7
Participant
Participant

Wow its working. 

 

Thanks again sir. You are so kind. 

0 Likes
Message 16 of 16

paullimapa
Mentor
Mentor

you are welcome...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes