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

_Plotstyle names...

9 REPLIES 9
Reply
Message 1 of 10
serge
469 Views, 9 Replies

_Plotstyle names...

Is there any way to retrieve the plotstyle(s) that are associated with Model and Paper Space Layout(s) in a certain drawing (included if there's a missing one) ... thanks ... SMD
DEVIDTS Serge, CAD Consultant
http://www.CADdICT.be
9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: serge

;;try this
;;is this what you mean
(defun ListAllPlotStyles (/ ad al)
(setq ad (vla-get-activedocument (vlax-get-acad-object)) al (vla-get-activelayout ad))
(vlax-safearray->list (vlax-variant-value (vla-GetPlotStyleTableNames al)))
)

(LISTALLPLOTSTYLES)
Message 3 of 10
serge
in reply to: serge

Thanks for you reply, but it's not that what I mean...
We do have an ACAD 2004 which is very slow when calling the OPTIONS or PLOT diabox. Seems this has something to do with the amount of plotstyles ACAD is finding in his dedicated directory. My idea is to clear this directory and auto fill it with only the plostyles a drawing is needing when one starts that drawing. Meaning: analyzing which plotstyles an openend drawing does have (Model and Paper Space Tabs), so I can search for them at a different location and copy them auto in the dedictated plotsyle directory... Thanks for any ideas ... SMD
DEVIDTS Serge, CAD Consultant
http://www.CADdICT.be
Message 4 of 10
Anonymous
in reply to: serge

You can import layouts from a template like this:

(defun implay ()
(setvar "tilemode" 0)
(setq lst (mapcar 'strcase (layoutlist)))
(foreach x (mapcar 'strcase
'("mylayout1" "mylayout2" "mylayout3" "mylayout4" "mylayout5"))
(if (vl-position x lst)
(princ "\nlayout already exists")
(command "layout" "t" "mylayouts.dwt" x)))
(command "layout" "d" "layout1");;;this removes the standard layout1 and layout2
(command "layout" "d" "layout2")
(setvar "tilemode" 1)
(princ))
I also use the aclyutil.arx tools and pagein my page setups
from a standard location. Is that what you're looking for?
HTH
Message 5 of 10
serge
in reply to: serge

Thanks agian, but I guess my question is not well understood.
I just want to know the name of the plotstyle a particular drawing has, just as I would analyze it manually by doing: PLOT->Plot Device->Plot Style Table... SMD
DEVIDTS Serge, CAD Consultant
http://www.CADdICT.be
Message 6 of 10
Anonymous
in reply to: serge

This ????????????



(setq AD (vla-get-activedocument (vlax-get-acad-object )))
(setq AL (vla-get-ActiveLayout AD))

;(vla-get-PlotWithPlotStyles AL)


(vlax-safearray->list
(vlax-variant-value
(vla-GetPlotStyleTableNames AL)
)
)
Message 7 of 10
serge
in reply to: serge

No, NOT ALL the plotstyles, JUST the name of the plotstyle which is attached to the current drawing... Thanks ... SMD
DEVIDTS Serge, CAD Consultant
http://www.CADdICT.be
Message 8 of 10
Anonymous
in reply to: serge

maybe this

This is the stylesheet of the current drawing of theactive layout

(vla-get-StyleSheet(vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))
Message 9 of 10
serge
in reply to: serge

YES ! ... Thanks !!!
DEVIDTS Serge, CAD Consultant
http://www.CADdICT.be
Message 10 of 10
tkinsley
in reply to: serge

That's cool, what about getting the plotter device instead of plotstyle.

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

Post to forums  

Forma Design Contest


Autodesk Design & Make Report