Jump to content

Recommended Posts

Posted

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)

 

Posted

So where is it going wrong? Is it switching between drawings or just switching to one drawing and then stopping?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...