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

Redefine Multiple Page Setups Without "Scale Line weights" checked

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
156 Views, 3 Replies

Redefine Multiple Page Setups Without "Scale Line weights" checked

I have a bunch of drawings with multiple layout tabs that have multiple page setups defined with the "scale line weights" box checked. The result prints too light to be legible. Can anyone help me to automate (using lisp or visual lisp) the process of redefining whatever page setups have that option so that they no longer do? Thank you !
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

Steve,

This demonstrates how to step through an ActiveX collection.
I hope it does more than just answer your question. With this
in-hand and some time spent studying the Object Model under
ActiveX and VBA Reference, maybe you wouldn't need to ask a
similar question in the future.

The ModelType check isn't actually needed in this case. I included
it because if you wanted to turn lineweight scaling on then modelspace
configs should be filtered out.

Joe Burke

[code]
;; ModelType -1 is a modelspace config.
;; ModelType 0 is a paperspace config.
;; The ScaleLineweights property only applies to paperspace configs.
(defun c:demo ( / doc pltconfigs)
(vl-load-com)
(setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))
; Get the PlotConfigurations collection.
(setq pltconfigs (vla-get-PlotConfigurations doc))
; Step through the collection...
(vlax-for x pltconfigs
(if (= 0 (vlax-get x 'ModelType))
; Turn scaling off.
(vlax-put x 'ScaleLineweights acFalse)
)
)
(princ)
) ;end
[/code]


wrote in message news:5802349@discussion.autodesk.com...
I have a bunch of drawings with multiple layout tabs that have multiple page setups
defined with the "scale line weights" box checked. The result prints too light to be
legible. Can anyone help me to automate (using lisp or visual lisp) the process of
redefining whatever page setups have that option so that they no longer do? Thank
you !
Message 3 of 4
Anonymous
in reply to: Anonymous

Thank you, Joe ! I've just started to look at Active X a little very recently. I've got a long way to go on understanding even the basic rudimentary concepts, though, and I'm not familiar enough with the reference you mentioned to find anything very readily yet. I'll keep at it though. When I see some of the code that you who know it put out, it appears very powerful. Thanks for coming to my rescue again !!
Message 4 of 4
Anonymous
in reply to: Anonymous

Steve,

You're welcome.

The Object Model is the key to understanding ActiveX with vlisp. Ask more
questions... 🙂

Joe Burke

wrote in message news:5802526@discussion.autodesk.com...
Thank you, Joe ! I've just started to look at Active X a little very recently. I've
got a long way to go on understanding even the basic rudimentary concepts, though,
and I'm not familiar enough with the reference you mentioned to find anything very
readily yet. I'll keep at it though. When I see some of the code that you who know
it put out, it appears very powerful. Thanks for coming to my rescue again !!

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

Post to forums  

Autodesk Design & Make Report

”Boost