<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Change vis state with dialog box in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13409848#M1276</link>
    <description>&lt;P&gt;which is exactly how I did that in my code I posted previously:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1743809818446.png" style="width: 825px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1485949i880AE9AAD5E2BC15/image-dimensions/825x98?v=v2" width="825" height="98" role="button" title="paullimapa_0-1743809818446.png" alt="paullimapa_0-1743809818446.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_1-1743809870934.png" style="width: 919px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1485950iBBE5001CDEF48573/image-dimensions/919x155?v=v2" width="919" height="155" role="button" title="paullimapa_1-1743809870934.png" alt="paullimapa_1-1743809870934.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Apr 2025 23:38:08 GMT</pubDate>
    <dc:creator>paullimapa</dc:creator>
    <dc:date>2025-04-04T23:38:08Z</dc:date>
    <item>
      <title>Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404433#M1264</link>
      <description>&lt;P&gt;I have a lisp that will change the visibility state of a dynamic block in all layouts (h/t Lee Mac). I would like to use a dialog box with either a list or a pull-down menu to set the variable for the visibility state. Can anyone help with that?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 13:30:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404433#M1264</guid>
      <dc:creator>charles_neelyFG4LK</dc:creator>
      <dc:date>2025-04-02T13:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404722#M1265</link>
      <description>&lt;P&gt;Could you share that lisp and the dynamic block that you want this to work on?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 15:45:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404722#M1265</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-04-02T15:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404745#M1266</link>
      <description>&lt;P&gt;Here are the files&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 15:54:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404745#M1266</guid>
      <dc:creator>charles_neelyFG4LK</dc:creator>
      <dc:date>2025-04-02T15:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404893#M1267</link>
      <description>&lt;P&gt;so when you click on the down triangle, you don't like to select the visibility states options from that list?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1743613667248.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1484889iB8FDD7658DE19508/image-size/medium?v=v2&amp;amp;px=400" role="button" title="paullimapa_0-1743613667248.png" alt="paullimapa_0-1743613667248.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 17:08:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404893#M1267</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-04-02T17:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404899#M1268</link>
      <description>&lt;P&gt;The lisp will change the vis state in all layouts which is desirable. Typically there are multiple layouts.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 17:11:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404899#M1268</guid>
      <dc:creator>charles_neelyFG4LK</dc:creator>
      <dc:date>2025-04-02T17:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404931#M1269</link>
      <description>&lt;P&gt;try&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;VSetP.lsp&lt;/STRONG&gt;...no dialog box but select a # list from cursor menu.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Load &amp;amp; run&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;VSetP&lt;/STRONG&gt; then select the dynamic block in this case&amp;nbsp;&lt;STRONG&gt;WSB-SCALE-DYN&lt;/STRONG&gt; on the drawing screen and you'll get this # list to select from:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1743615079654.png" style="width: 1046px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1484892i2A4214C9AEDE9993/image-dimensions/1046x706?v=v2" width="1046" height="706" role="button" title="paullimapa_0-1743615079654.png" alt="paullimapa_0-1743615079654.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 21:23:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13404931#M1269</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-04-02T21:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13405134#M1270</link>
      <description>&lt;P&gt;Found a routine that I've posted already before.... to match the visibility state. Just fix one, then run the routine to match the rest.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:MatchVisibility ( / LM:getvisibilityparametername e p v s i)
  
  ;; http://www.lee-mac.com/dynamicblockfunctions.html#getvisibilityparametername
  (defun LM:getvisibilityparametername ( blk / vis )
    (if (and (vlax-property-available-p blk 'effectivename)
	     (setq blk (vla-item (vla-get-blocks (vla-get-document blk))
				 (vla-get-effectivename blk)))
	     (= :vlax-true (vla-get-isdynamicblock blk))
	     (= :vlax-true (vla-get-hasextensiondictionary blk))
	     (setq vis (vl-some '(lambda ( pair ) (if (and (= 360 (car pair))
							   (= "BLOCKVISIBILITYPARAMETER" (cdr (assoc 0 (entget (cdr pair))))))
						    (cdr pair)))
				(dictsearch (vlax-vla-object-&amp;gt;ename (vla-getextensiondictionary blk)) "ACAD_ENHANCEDBLOCK"))))
      (cdr (assoc 301 (entget vis)))))
  
  ; ==========================================================================================================================
  
  (if (and (setq e (car (entsel "\nSelect source block: ")))
	   (or (= "INSERT" (cdr (assoc 0 (entget e))))
	       (prompt "\nError: Selected object is not a block!"))
	   (or (setq p (LM:getvisibilityparametername (vlax-ename-&amp;gt;vla-object e)))
	       (prompt "\nError: Selected block has no visibility parameter!"))
	   (setq v (getpropertyvalue e (strcat "AcDbDynBlockProperty" p)))
	   (setq s (ssget "_A" '((0 . "INSERT"))))
	   )
    (repeat (setq i (sslength s))
      (if (setq p (LM:getvisibilityparametername (vlax-ename-&amp;gt;vla-object (setq e (ssname s (setq i (1- i)))))))
	(vl-catch-all-apply 'setpropertyvalue (list e (strcat "AcDbDynBlockProperty" p) v)))))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Apr 2025 07:01:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13405134#M1270</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2025-04-05T07:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13405240#M1271</link>
      <description>&lt;P&gt;Got this error when running that lisp&lt;BR /&gt;; error: bad argument type: stringp nil&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 20:16:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13405240#M1271</guid>
      <dc:creator>charles_neelyFG4LK</dc:creator>
      <dc:date>2025-04-02T20:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13405366#M1272</link>
      <description>&lt;P&gt;Here's a new code &lt;STRONG&gt;VSetPW.lsp&lt;/STRONG&gt; that lets you select from a window list box.&lt;/P&gt;&lt;P&gt;PS: Double clicking will also dismiss the list box with the current item selected&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1743629114219.png" style="width: 752px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1484972i3E15F492E4268EED/image-dimensions/752x642?v=v2" width="752" height="642" role="button" title="paullimapa_0-1743629114219.png" alt="paullimapa_0-1743629114219.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 00:20:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13405366#M1272</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-04-03T00:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13406024#M1273</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/16701787"&gt;@charles_neelyFG4LK&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Got this error when running that lisp&lt;BR /&gt;; error: bad argument type: stringp nil&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, difficult to fix since I'm not able to replicate the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 07:40:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13406024#M1273</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2025-04-03T07:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13408778#M1274</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/16701787"&gt;@charles_neelyFG4LK&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;check this mod to your code&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;;Contains lisp routines to change the visibility state of the WSB-SCALE-DYN block
;This is for the Renewables Group
;If there are any issues with its use please contact Charlie Neely, charles.neely@wsbeng.com
(defun c:ChgScaleBlock ()
    (setq blk "WSB-SCALE-DYN" ;; Block Name
;;          vis "1 = 10"    ;; New Visibility State
;;			komondormrex
		   _list '("1 = 10" "1 = 20" "1 = 30" "1 = 40" "1 = 50" "1 = 60" "1 = 100" "1 = 200" "1 = 300" "1 = 400" 
				   "1 = 500" "1 = 600" "1 = 700" "1 = 800" "1 = 1000" "1 = 1500" "1 = 2000" "H 1 = 20 V 1 = 4" "H 1 = 20 V 1 = 5" 
				   "H 1 = 20 V 1 = 10" "H 1 = 30 V 1 = 4" "H 1 = 30 V 1 = 5" "H 1 = 30 V 1 = 10" "H 1 = 40 V 1 = 4" 
				   "H 1 = 40 V 1 = 5" "H 1 = 40 V 1 = 10" "H 1 = 50 V 1 = 4" "H 1 = 50 V 1 = 5" "H 1 = 50 V 1 = 10"      
				   "H 1 = 100 V 1 = 5" "H 1 = 100 V 1 = 10" "H 1 = 20 V 1 = 4 BAR" "H 1 = 20 V 1 = 5 BAR" "H 1 = 20 V 1 = 10 BAR"
				  )    
		   vis (get_listed_choice vis "Pick Visibility State" _list nil)
;;			komondormrex
    )
    (if (and vis (setq sel (ssget "_X" (list '(0 . "INSERT") (cons 2 (strcat "`*U*," blk)) '(410 . "~Model")))))
        (repeat (setq idx (sslength sel))
            (if (= (strcase blk) (strcase (blockname (setq obj (vlax-ename-&amp;gt;vla-object (ssname sel (setq idx (1- idx))))))))
                (SetVisibilityState obj vis)
            )
        )
    )
    (princ)
)

;; Block Name 
;; Returns the true (effective) name of a supplied block reference
                        
(defun blockname ( obj )
    (if (vlax-property-available-p obj 'effectivename)
        (defun blockname ( obj ) (vla-get-effectivename obj))
        (defun blockname ( obj ) (vla-get-name obj))
    )
    (blockname obj)
)

;; Set Dynamic Block Visibility State
;; Sets the Visibility Parameter of a Dynamic Block (if present) to a specific value (if allowed)
;; blk - [vla] VLA Dynamic Block Reference object
;; val - [str] Visibility State Parameter value
;; Returns: [str] New value of Visibility Parameter, else nil

(defun SetVisibilityState ( blk val / vis )
    (if
        (and
            (setq vis (getvisibilityparametername blk))
            (member (strcase val) (mapcar 'strcase (getdynpropallowedvalues blk vis)))
        )
        (setdynpropvalue blk vis val)
    )
)

;; Set Dynamic Block Property Value  -  Lee Mac
;; Modifies the value of a Dynamic Block property (if present)
;; blk - [vla] VLA Dynamic Block Reference object
;; prp - [str] Dynamic Block property name (case-insensitive)
;; val - [any] New value for property
;; Returns: [any] New value if successful, else nil

(defun setdynpropvalue ( blk prp val )
    (setq prp (strcase prp))
    (vl-some
       '(lambda ( x )
            (if (= prp (strcase (vla-get-propertyname x)))
                (progn
                    (vla-put-value x (vlax-make-variant val (vlax-variant-type (vla-get-value x))))
                    (cond (val) (t))
                )
            )
        )
        (vlax-invoke blk 'getdynamicblockproperties)
    )
)

;; Get Dynamic Block Property Allowed Values
;; Returns the allowed values for a specific Dynamic Block property.
;; blk - [vla] VLA Dynamic Block Reference object
;; prp - [str] Dynamic Block property name (case-insensitive)
;; Returns: [lst] List of allowed values for property, else nil if no restrictions

(defun getdynpropallowedvalues ( blk prp )
    (setq prp (strcase prp))
    (vl-some '(lambda ( x ) (if (= prp (strcase (vla-get-propertyname x))) (vlax-get x 'allowedvalues)))
        (vlax-invoke blk 'getdynamicblockproperties)
    )
)

;; Get Visibility Parameter Name
;; Returns the name of the Visibility Parameter of a Dynamic Block (if present)
;; blk - [vla] VLA Dynamic Block Reference object
;; Returns: [str] Name of Visibility Parameter, else nil

(defun getvisibilityparametername ( blk / vis )  
    (if
        (and
            (vlax-property-available-p blk 'effectivename)
            (setq blk
                (vla-item
                    (vla-get-blocks (vla-get-document blk))
                    (vla-get-effectivename blk)
                )
            )
            (= :vlax-true (vla-get-isdynamicblock blk))
            (= :vlax-true (vla-get-hasextensiondictionary blk))
            (setq vis
                (vl-some
                   '(lambda ( pair )
                        (if
                            (and
                                (= 360 (car pair))
                                (= "BLOCKVISIBILITYPARAMETER" (cdr (assoc 0 (entget (cdr pair)))))
                            )
                            (cdr pair)
                        )
                    )
                    (dictsearch
                        (vlax-vla-object-&amp;gt;ename (vla-getextensiondictionary blk))
                        "ACAD_ENHANCEDBLOCK"
                    )
                )
            )
        )
        (cdr (assoc 301 (entget vis)))
    )
)

;**********************************************************************************************************************
;	komondormrex, apr 2025
;**********************************************************************************************************************
(defun get_listed_choice (set_choice list_prompt _list multiple / dcl_lines dcl_filename_full glc_dcl_id _list
														 		  dialog_result selected_choices default_choice
					   	 )
	;******************************************************************************************************************
	(defun write_dialog_file (dcl_lines / temp_file_path dcl_filename_full dcl_file_id)
		(setq temp_file_path (vla-get-TempFilePath (vla-get-Files (vla-get-preferences (vlax-get-acad-object))))
			  dcl_filename_full (vl-filename-mktemp "Dialog" temp_file_path ".dcl"])
			  dcl_file_id (open dcl_filename_full "w")
		)
		(mapcar '(lambda (dcl_str) (write-line dcl_str dcl_file_id))
				 dcl_lines
		)
		(close dcl_file_id)
		dcl_filename_full
	)
	;******************************************************************************************************************
	(defun populate_list ( list_key list_to_process )
		(start_list list_key 3)
			(mapcar 'add_list
				  	(mapcar '(lambda (list_element)
				  			 	(strcat "\n" list_element)
				  			 )
				  			 list_to_process
				  	)
			)
		(end_list)
	)
	;******************************************************************************************************************
	(setq dcl_lines (list "List_Box : dialog {"
												"initial_focus = \"List_Box\";"
									  			(strcat "label = \"" list_prompt "\";")
												": list_box {"
																"key = \"List_Box\";"
																"width = 50;"
																"height = 20;"
																"allow_accept = true;"
																(if multiple "multiple_select = true;" "")
														   "}"
														   "ok_cancel;"
											"}"
					)
		  dcl_filename_full (write_dialog_file dcl_lines)
		  glc_dcl_id (load_dialog dcl_filename_full)
	)
	(if glc_dcl_id
		(if (new_dialog "List_Box" glc_dcl_id)
			(progn
				(populate_list "List_Box" _list)
				(if (setq default_choice (vl-position set_choice _list))
					(set_tile "List_Box" (itoa default_choice))
;					(set_tile "List_Box" "0")
				)
				(action_tile "List_Box" "(cond
											((= 4 $reason) (setq selected_choices $value))
											(t (setq selected_choices $value))
										 )
									    "
				)
				(setq dialog_result (start_dialog))
				(unload_dialog glc_dcl_id)
				(vl-file-delete dcl_filename_full)
				(cond
						((= dialog_result 1)
							(if selected_choices
								(if multiple
									(setq selected_choices (mapcar '(lambda (index) (nth index _list))
																	(read (strcat "(" selected_choices ")"))
														   )
									)
									(setq selected_choices (nth (atoi selected_choices) _list))
								)
							)
						)
						(t (setq selected_choices nil))
				)
			)
		  )
	 )
)
;**********************************************************************************************************************&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 06 Apr 2025 15:31:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13408778#M1274</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2025-04-06T15:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13409842#M1275</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp;if you have a block and can select it then this should produce _list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq obj (vlax-ename-&amp;gt;vla-object (car (entselect '\nPick a block "))))
(setq visval (LM:getvisibilityparametername obj))
(setq _lst (LM:getdynpropallowedvalues obj visval))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Apr 2025 23:32:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13409842#M1275</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-04-04T23:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13409848#M1276</link>
      <description>&lt;P&gt;which is exactly how I did that in my code I posted previously:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1743809818446.png" style="width: 825px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1485949i880AE9AAD5E2BC15/image-dimensions/825x98?v=v2" width="825" height="98" role="button" title="paullimapa_0-1743809818446.png" alt="paullimapa_0-1743809818446.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_1-1743809870934.png" style="width: 919px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1485950iBBE5001CDEF48573/image-dimensions/919x155?v=v2" width="919" height="155" role="button" title="paullimapa_1-1743809870934.png" alt="paullimapa_1-1743809870934.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 23:38:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13409848#M1276</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-04-04T23:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13409853#M1277</link>
      <description>&lt;P&gt;Sorry &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;missed that, because there is more than 20 visibility states yes have to use a list box, rather than say a radio button solution, which I cut the code from. Just me would have had 2 blocks one for 1:x and the other for V x &amp;amp; H y, bit easier to choose.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the 1:x is used with a layout viewport to indicate scale you can get the viewport scale so would auto set to correct 1:x without need for selecting scale.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 23:45:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13409853#M1277</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-04-04T23:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13409871#M1278</link>
      <description>&lt;P&gt;tricky thing is the 2nd portion of the lists contains selections that would give you multiple scales or multiple scale bars:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1743812638684.png" style="width: 921px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1485952i1B915C81A05ACE2C/image-dimensions/921x352?v=v2" width="921" height="352" role="button" title="paullimapa_0-1743812638684.png" alt="paullimapa_0-1743812638684.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Apr 2025 00:24:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13409871#M1278</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-04-05T00:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13410077#M1279</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&lt;/P&gt;&lt;P&gt;and if you have only the block name, like in the op's code? i mean you start the code getting the block name to do dialog, nothing's been selected so far. and btw i'd prefer it lm free))) i mean there is nothing that complex to write such a code from scratch, for me to be correct)))&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Apr 2025 05:59:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13410077#M1279</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2025-04-05T05:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13410123#M1280</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/16701787"&gt;@charles_neelyFG4LK&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Got this error when running that lisp&lt;BR /&gt;; error: bad argument type: stringp nil&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the updated code. It should overcome the error.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Apr 2025 07:02:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13410123#M1280</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2025-04-05T07:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Change vis state with dialog box</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13415145#M1281</link>
      <description>&lt;P&gt;Been away from this for a few days. Thanks for the help with this, got me all set up!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 16:51:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-vis-state-with-dialog-box/m-p/13415145#M1281</guid>
      <dc:creator>charles_neelyFG4LK</dc:creator>
      <dc:date>2025-04-08T16:51:49Z</dc:date>
    </item>
  </channel>
</rss>

