(setq vis (LM:getvisibilityparametername blk)) (defun LM:SetVisibilityState ( blk val / vis ) Returns: New value of Visibility Parameter, else nil blk - VLA Dynamic Block Reference object Sets the Visibility Parameter of a Dynamic Block (if present) to a specific value (if allowed) Since you are looking to modify the Visibility State in particular, you may wish to consider the following set of functions that I have developed as part of my dynamic block library to modify the visibility state of a supplied block reference object: Set Dynamic Block Visibility State - Lee Mac This method will return a block reference vla-object, whose dynamic block properties you can then manipulate using the array of dynamic block properties returned by the getdynamicblockproperties method. (vla-get-activedocument (vlax-get-acad-object))
![autocad lisp change attribute block with command autocad lisp change attribute block with command](https://3.bp.blogspot.com/--TYWRMWwuEc/VrHNCTrzNUI/AAAAAAAADck/ofYRH4fls5A/s1600/Export%2Btext%2Bfrom%2Bautocad%2Bto%2Bexcel%2BNorthing%2BEasting%2Bas%2Bpoints.gif)
(setq ins (getpoint "\nSpecify insertion point: ")) (setq dwg (getfiled "Select Block" "" "dwg" 16))
Autocad lisp change attribute block with command how to#
Here is a basic example demonstrating how to use the insertblock method: (defun c:test ( / dwg ins ) then you can forego the INSERT command entirely, and use the insertblock method of the target container object (modelspace/paperspace/block definition), which will return a block reference vla-object. If the visual preview of the inserted block is NOT required. Since the standard AutoCAD INSERT command does not prompt for dynamic block parameter values during block insertion, you'll need to insert the block and then manipulate the visibility state using the ActiveX properties & methods of the inserted dynamic block reference, specifically, using the getdynamicblockproperties method. The answer to this question ultimately depends on whether or not you require the visual preview of the inserted block reference, as afforded by the AutoCAD INSERT command.