Jump to content

Visibility list in Dynamic Block


alijahed

Recommended Posts

Hi All,

 

I inserted a dynamic block in the screen and I want to change the visibility list of it.

 

I was thinking it should be very straight forward but it is not easy apparently!

 

Anyway, I start to collect information about the block but I can't understand how can I find and change the visibility parameter out of those information!

 

I wrote:

 

(defun c:test ()

(vl-load-com)

(setq e (car (entsel)))

(setq obj (vlax-ename->vla-object e))

(setq propname (vla-GetDynamicBlockProperties obj)) ;Get the parameters

(setq var (vlax-variant-value propname)) ;Convert variant to SafeArray

(setq numd (vlax-safearray-get-dim var)) ;Returns the number of dimensions in a safearray object

(setq lis (vlax-safearray->list var)) ;Convert safearray to list

(print e)

(print obj)

(print propname)

(print var)

(print numd)

(print lis)

(princ)

)

 

and I get:

Command: test

Select object:

#

#

#

1

(#)

 

I attached the file as well.

Can you please help me with that?

 

Cheers

 

Ali

Test.dwg

Link to comment
Share on other sites

Hi All,

 

I inserted a dynamic block in the screen and I want to change the visibility list of it.

 

I was thinking it should be very straight forward but it is not easy apparently!

 

Anyway, I start to collect information about the block but I can't understand how can I find and change the visibility parameter out of those information!

 

I wrote:

 

 

 

and I get:

 

 

I attached the file as well.

Can you please help me with that?

 

Cheers

 

Ali

Not sure if this is what you are after. See link: http://www.cadtutor.net/forum/showthread.php?t=41059&highlight=visibility+STATE

Link to comment
Share on other sites

  • 2 weeks later...

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