Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lisp to set Model space to "display as plot style?

3 REPLIES 3
Reply
Message 1 of 4
SLeech
1863 Views, 3 Replies

Lisp to set Model space to "display as plot style?

Hi all,

 

Is there a way to get model space to "display plot styles" through a lisp routine or a script?

The reason I'm asking is because i'm curently setting up a whole bunch of custom tool palettes for the company I work for and instead of the icons dispalying in their actual colour (at the moment they're green, which doesn't show up very well on the light grey background), I'd rather they show in the plotstyle assigned to the individual dwg's.

 

At the moment I know if you call up the page setup manager (while in model space) and click modify, you can then check the radio button to "display plot styles" in the top-right corner. But when you have around 100 - 200 blocks to change, that process can be rather time consuming and cumbersome!

 

Btw, I'm using Windows 7

and AutoCAD 2013 Full version.

 

Any help would be much appreciated!

 

Cheers,

 

Steven

3 REPLIES 3
Message 2 of 4
lgabriel
in reply to: SLeech

Not too sure on exactly what you are looking for but if each drawing file has a defined page setup (only one), then the following code will display the plot style (*.ctb) through an alert box.

 

(defun c:dps()
   (setq a (dictsearch(namedobjdict)"ACAD_PLOTSETTINGS"))
   (setq b (vl-remove-if '(lambda(x)(/=(car x) 350)) a))
   (alert (cdr(assoc 7 (entget (cdr (car b))))))
)

Message 3 of 4
SLeech
in reply to: lgabriel

Thanks very much for your reply. I actually tested a file where I manually set the Model space to display as the current plot style, saved it and went to update the palettes tool image, but it stayed the same (green), so I realised AutoCAD doesn't take a snapshot of whatever the screen is showing for the image, but rather it saves an image based on the current objects colour in Model space, so it didn't really matter what I told AutoCAD to read 'green' as. 

 

I am now going through the tedious process of opening up all 200 blocks and changing the objects within to layer 0 (white) as the previous person who set these up, saved all the objects on the layer it was supposed to be saved on when brought into a new drawing!

Message 4 of 4
dmarchant
in reply to: SLeech

Just lock your viewport (makes sure in your page layout Display plot style is ticked..under ctb) click into the view port model space & you will see & be able work with your drawing with plot styles displayed.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost