Jump to content

Viewport vers Model layers in VBA??


muck

Recommended Posts

AutoCAD 2009

 

How can a person use VBA to control viewport layers vers controling model space

layers? With a drawing with more than one viewport?

Thank you,

Link to comment
Share on other sites

thinking out loud, grab the viewport you want, get its handle, go inside the VP and then manipulate the layers from there

Link to comment
Share on other sites

How do you change layer name and color using VBA Code? For example

say you want layer 1 in a view port to be red. Layer one in model space to be

green. Say you want layer one to be blue in second view port. How can this

be done with VBA code?

Thank you,

Link to comment
Share on other sites

I can scan thru the layers collections and use something like objLayer.color = TxBoxLayerColor(k) to set color of a layer for the drawing but how can I set

a color in a viewport in paper space without changing the drawing layer color.

There must be a way to access the color in the view port some how.

Link to comment
Share on other sites

I will check tomorrow at work, but I would think IF it can be done, there will be a property in the layout or viewport collection, not the layer collection

Link to comment
Share on other sites

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