Jump to content

Refer to a dynamic block visibility state VBA


kyosmith

Recommended Posts

How to refer a dynamic block visility state with VBA?

 

in some cases i need to insert a block with a diferent visibilty state. and i dont want to create diferent blocks for each visibility state.

 

is it possible to do that?

 

thanks all!

Link to comment
Share on other sites

It is possible although I only investigated doing it rather than using it. However, your profile says you are using LT - you won't have access to VBA or LISP. Is your profile wrong?

Link to comment
Share on other sites

Maybe you should change your profile :)

 

Its taken me a little while to find what I did but here is a code extract.

 

Public Sub SelSetTest1()
Dim BlockRefObj As AcadBlockReference
Dim PropList As Variant

Set BlockRefObj = mySelectionSet.Item(0)
PropList = BlockRefObj.GetDynamicBlockProperties

 

I was using a selectionset to get my object but you can use whatever works for you. Once you have the properties list you can read the visibility sate or set the visibility state.

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