Results 1 to 7 of 7

Thread: Get list to visibility states of dynamic block

  1. #1
    I could stop if I wanted to
    Join Date
    2009-04
    Location
    Houston, TX
    Posts
    204
    Login to Give a bone
    0

    Default Get list to visibility states of dynamic block

    Is it possible to get a list of all block visibility states, not just the current state?

    I have a lisp routine to update titleblock info and it would be nice if each time someone new gets hired, or leaves, only updating the dynamic block would need to be done... and the routine would just grab the list of visibility states and "update itself".

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,419
    Login to Give a bone
    0

    Default Re: Get list to visibility states of dynamic block

    Are you working with lisp or vba?
    C:> ED WORKING....


    LinkedIn

  3. #3
    I could stop if I wanted to
    Join Date
    2009-04
    Location
    Houston, TX
    Posts
    204
    Login to Give a bone
    0

    Default Re: Get list to visibility states of dynamic block

    My mistake, working in lisp. Browsing around and forgot which forum I was in.

  4. #4
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    439
    Login to Give a bone
    0

    Default Re: Get list to visibility states of dynamic block

    Wouldn't this just be a matter of redefining the block via something like design center or a tool palette?

  5. #5
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Get list to visibility states of dynamic block

    Hi,

    Please try this:

    Code:
    (if (and (setq blk (car (entsel "\nSelect Dynamic block with Visibility State :")))
             (= (vla-get-isdynamicblock (setq blk (vlax-ename->vla-object blk))) :vlax-true)
        )
      (progn
        (setq props (vlax-invoke blk 'getdynamicblockproperties))
        (foreach prop (vlax-get (car props) 'allowedvalues)
          (print prop)
        )
      )
    ) (vl-load-com)

  6. #6
    I could stop if I wanted to
    Join Date
    2009-04
    Location
    Houston, TX
    Posts
    204
    Login to Give a bone
    0

    Default Re: Get list to visibility states of dynamic block

    Quote Originally Posted by Tharwat View Post
    Hi,

    Please try this:

    Code:
    (if (and (setq blk (car (entsel "\nSelect Dynamic block with Visibility State :")))
             (= (vla-get-isdynamicblock (setq blk (vlax-ename->vla-object blk))) :vlax-true)
        )
      (progn
        (setq props (vlax-invoke blk 'getdynamicblockproperties))
        (foreach prop (vlax-get (car props) 'allowedvalues)
          (print prop)
        )
      )
    ) (vl-load-com)
    This works perfectly yes.

  7. #7
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Get list to visibility states of dynamic block

    Quote Originally Posted by M. Kubitza View Post
    This works perfectly yes.
    Good for you.

Similar Threads

  1. 2016: Dynamic block that shows/hides certain visibility states
    By kazakhkaster743054 in forum Dynamic Blocks - Technical
    Replies: 8
    Last Post: 2017-02-17, 12:14 PM
  2. LSP & Dynamic Block Visibility States
    By ReachAndre in forum AutoLISP
    Replies: 1
    Last Post: 2007-11-20, 09:32 AM
  3. Getting Visibility States to work in a Single door Dynamic Block
    By KGC in forum Dynamic Blocks - Technical
    Replies: 3
    Last Post: 2007-01-02, 03:40 PM
  4. Visibility States list not showing
    By Jack Cheong in forum Dynamic Blocks - Technical
    Replies: 2
    Last Post: 2006-08-11, 04:36 AM
  5. Is there a way to see all Visibility states within a Dynamic Block
    By KansasCAD in forum Dynamic Blocks - Technical
    Replies: 3
    Last Post: 2006-04-17, 06:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •