Visibility states in custom order, not alphabethical

Hi all, and thanks in advance for reading/helping

Is there a way to see the Visibility states in custom order?
I Made them in a custom order, but in the properties pane they're alphabetical.

Block editor:

Properties:



Comments

  • Hello,

    Unfortunately you cannot have a custom order for the visibility states at the moment, but our development team has this feature on the list.

    I recommend to create a feature request so your request will be added to the task.

    Have a nice day!

  • You are talking about dynamic block visibility state a I have something that will display all the states in construction order, I use it as a choose visibility when inserting a dynamic block rather than have user select the little button.

    Its based on the great code dynamic block properties by Lee-mac.

    Just ask if sounds like what you want note it is not for use inside Block editor.

  • Hi Alan, I'ld definitely like to take a look at that solution.
    If it doesn't solve the current problem it might be usefull for another 😄

  • You need to get a copy of Lee-mac.com dynamic block properties as some of the functions need to be loaded prior to this code. Just follow the function names.

    The part you want.

    Change dynamic block properties when inserting look at properties available.
    ; By Alan H June 2022

    ;; Get Dynamic Block Property Allowed Values - Lee Mac
    ;; Returns the allowed values for a specific Dynamic Block property.
    ;; Set Dynamic Block Visibility State - Lee Mac
    ;; Sets the Visibility Parameter of a Dynamic Block (if present) to a specific value (if allowed)
    ;; Get Visibility Parameter Name - Lee Mac
    ;; Returns the name of the Visibility Parameter of a Dynamic Block (if present)

    (defun insdynv (blkname / pt obj lst ans)
    (if (not LM:setdynpropvalue )(load "Lee-mac Dynamic block get-put"))
    (setq pt (getpoint "\nPick a pt for block "))
    (command "-insert" blkname "s" 1.0 pt 0)
    (setq obj (vlax-ename->vla-object (entlast)))
    (setq visval (LM:getvisibilityparametername obj))
    (setq lst (LM:getdynpropallowedvalues obj visval))
    (setq lst (cons "Please choose" lst))
    (if (not AH:Butts)(load "Multi Radio buttons.lsp"))
    (if (not AHbut)(setq AHbut 1))
    (setq ans (ah:butts 1 "v" lst))
    (LM:SetVisibilityState obj ans)
    (princ)
    )

    ; set existing block visibilty

    (defun insdyne (blkname / pt obj lst ans)
    (if (not LM:setdynpropvalue )(load "Lee-mac Dynamic block get-put"))
    (if (not AH:Butts)(load "Multi Radio buttons.lsp"))
    (setq obj (vlax-ename->vla-object (car (entsel "\nPick a dynamic block "))))
    (setq visval (LM:getvisibilityparametername obj))
    (setq lst (LM:getdynpropallowedvalues obj visval))
    (setq lst (cons "Please choose" lst))
    (if (not AH:Butts)(load "Multi Radio buttons.lsp"))
    (if (not AHbut)(setq AHbut 1))
    (setq ans (ah:butts 1 "v" lst))
    (LM:SetVisibilityState obj ans)
    (princ)
    )