3/2/2023 0 Comments Block count autocad lisp![]() ![]() ![]() (setq parname (getstring "\nEnter the Visibility Parameter Name: ")) (setq blkname (getstring T "\nEnter the Block Name: ")) Not tested, I don't have AutoCAD in this pc. Or to use the function at the commandline as a command, without changing the original code, perhaps something like this (dbvisname "YourBlockName" "TheVisibilityParameterName") You'll kneed to load the code and run the code with something like this Pebejse's function DbVisName, have two arguments, Welcome to the Autodesk Discussion Groups, Chris! )(if (null data) (princ "\nBlock/Parameter Name not found")) (princ (strcat "\nTotal \"" bname "\" Blocks Found: " (itoa (apply ' (mapcar 'cadr data))))) (setq data (subst (list vname (1 (cadr inc))) inc data)) (vlax-invoke e 'GetDynamicBlockProperties)))) (eq (strcase (vla-get-PropertyName j)) (strcase vis))) (setq Pname (car (vl-remove-if-not '(lambda (j) (defun DbVisName (bname vis / ss data i e pname vis vname inc) to count DB and their respective visility state Parameter names may vary from one DB to another, the Visibiity parameter name may or may not be be "Visibility", depending on the DB's author.Īnyhoo. Unfortunately there is no easy way to "catch" those without knowing the specific visibility parameter name, not saying there is none. Now I don't want to push my luck, but is there anyway to search for blocks by their name AND visibility state? You can reduce the number of selected blocks by using a wildcard match ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |