Jump to content

Recommended Posts

Posted

I need a command or a short lisp routine to set a ctb file on a open drawing. Is that possible?

 

I need this because i have alot of drawings where I need to set the correct customer CTB file on each drawing and instead of doing a manual job i want to able to do it by a script on a lot of drawings.

 

Please help! Thx in advance!

Posted

First you said you want to do it on an "open drawing", then you said you want to "do it by a script on a lot of drawings"

 

Is that two separate wishes or did I misunderstand?

Posted

Also, do you need to apply the plot style to model space, or a single layout, or multiple layouts or all of the above?

Posted

Here is some sample code (no error checking) that will set the plot style in the current layout in the current drawing.

 

(setq *acad-object* (vlax-get-acad-object))
(setq *active-document* (vla-get-activedocument *acad-object*))
(setq *active-layout* (vla-get-activelayout *active-document*))
(vla-put-stylesheet *active-layout* "mycustom.ctb")

  • Like 1

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...