3dwannab Posted 11 hours ago Posted 11 hours ago Hi all, Here's a function that doesn't work to set the plot styles for all open drawings. Is there something I'm missing? (defun set-pstyles (showBool / app docs orgDoc) (setq showBool (if showBool :vlax-true :vlax-false)) (setq app (vlax-get-acad-object)) (setq docs (vla-get-Documents app)) (setq orgDoc (vla-get-ActiveDocument app)) ; store the original (vlax-for d docs (vla-Activate d) (vla-put-ShowPlotStyles (vla-get-ActiveLayout d) showBool) (vla-Regen d acActiveViewport) ) (vla-Activate orgDoc) ) (set-pstyles T) ; (set-pstyles nil) Quote
Steven P Posted 9 hours ago Posted 9 hours ago So where is it going wrong? Is it switching between drawings or just switching to one drawing and then stopping? Quote
mhupp Posted 4 hours ago Posted 4 hours ago 6 hours ago, 3dwannab said: Is there something I'm missing? AutoCAD doesn't like multiple drawings. you will either have to do scripts or maybe vl-propagate ? Quote
3dwannab Posted 1 hour ago Author Posted 1 hour ago 3 hours ago, mhupp said: AutoCAD doesn't like multiple drawings. you will either have to do scripts or maybe vl-propagate ? Thanks @mhupp, I'll try that once I finish work tomorrow. @Steven P, when I replaced the vla-put-ShowPlotStyles with just a (princ "test') I think it only done the current doc. Will test tomorrow. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.