Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

using vlax-get-property

1 REPLY 1
Reply
Message 1 of 2
Anonymous
138 Views, 1 Reply

using vlax-get-property

 
1 REPLY 1
Message 2 of 2

Hi Mark! ----------- Try this: (entget (car (entsel))) -> Select the door Door Object Info: ============= ((-1 . ) (0 . "AEC_DOOR") (330 . ) (5 . "102F") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "A-Door") (100 . "AecDbEntity") (102 . "{AEC_SUBOBJECT") (300 . "AecImpDoor") (100 . "AecImpObj") (3 . "") (100 . "AecImpEnt") (171 . 0) (100 . "AecImpGeo") (10 14500.0 14900.0 0.0) (15 0.959366 -0.282166 0.0) (16 0.282166 0.959366 0.0) (210 0.0 0.0 1.0) (360 . ) (100 . "AecImpOpeningBase") (40 . 1500.0) (41 . 2000.0) (42 . 700.0) (100 . "AecImpOpenFiller") (43 . 0.0) (70 . 50) (71 . 0) (100 . "AecImpDoor") (345 . ) (102 . "AEC_SUBOBJECT}") (102 . "{AEC_NULLOBJECT}") (100 . "AecDbGeo") (100 . "AecDbOpeningBase") (100 . "AecDbOpenFiller") (100 . "AecDbDoor")) Try this: (entget (cdr (assoc 345 (entget (car (entsel)))))) -> Select the door Door Style Info: =========== ((-1 . ) (0 . "AEC_DOOR_STYLE") (5 . "102D") (102 . "{ACAD_REACTORS") (330 . ) (102 . "}") (330 . ) (100 . "AecDbObject") (102 . "{AEC_SUBOBJECT") (300 . "AecImpDoorStyle") (100 . "AecImpObj") (3 . "") (100 . "AecImpDictRecord") (3 . "") (100 . "AecImpDoorStyle") (40 . 50.0) (41 . 50.0) (42 . 50.0) (43 . 120.0) (44 . 50.0) (70 . 1) (71 . 0) (72 . 0) (102 . "AEC_SUBOBJECT}") (102 . "{AEC_NULLOBJECT}") (100 . "AecDbDictRecord") (100 . "AecDbDoorStyle")) Try this: (entget (cdr (assoc 330 (entget (cdr (assoc 345 (entget (car (entsel))))))))) -> Select the door Door Styles Dictionnary Info: ==================== ((-1 . ) (0 . "DICTIONARY") (5 . "738") (102 . "{ACAD_REACTORS") (330 . ) (102 . "}") (330 . ) (100 . "AcDbDictionary") (280 . 0) (281 . 1) (3 . "Bifold - Double") (350 . ) (3 . "Bifold - Single") (350 . ) (3 . "Cased Opening") (350 . ) (3 . "Hinged - Double") (350 . ) (3 . "Hinged - Double - Exterior") (350 . ) (3 . "Hinged - Double - Full Lite") (350 . ) (3 . "Hinged - Single") (350 . ) (3 . "Hinged - Single - Exterior") (350 . ) (3 . "Hinged - Single - Full Lite") (350 . ) (3 . "Overhead - Sectional - 2100") (350 . ) (3 . "Pocket - Single") (350 . ) (3 . "Revolving - Simple") (350 . ) (3 . "Sliding - Double - Full Lite") (350 . ) (3 . "Standard") (350 . )) The Plan: ---------- 1. (dictsearch (namedobjdict) "AEC_DOOR_STYLES")) to get [Door Styles List] 2. make the cycle to get DXF 350 from the next dotted pair after (3 . "Desired_Door_Style_Name") to get [] 3. make new selection set with (ssget "X" (list (cons 345 ))) 4. Oops! The Plan doesn't work! And who can tell me WHY ??? ;;; =========================================================== (defun SearchForDoorStyle ( doorStyleName / DoorStyles firstStyle StylesList nextName nextEntity doorStyleEntity ) (setq DoorStyles (dictsearch (namedobjdict) "AEC_DOOR_STYLES")) (setq firstStyle (assoc 3 DoorStyles)) (setq StylesList (member firstStyle DoorStyles)) (while (setq nextName (cdr (car StylesList))) (setq StylesList (cdr StylesList)) (setq nextEntity (cdr (car StylesList))) (setq StylesList (cdr StylesList)) (if (= nextName doorStyleName) (setq doorStyleEntity nextEntity) ) ; - 'if' ) ; - 'while' doorStyleEntity ) ; - 'defun' ;;; =========================================================== (defun SelectDoorsByStyle ( doorStyle / ss ) (setq ss (ssget "X" (list (cons 345 doorStyle)))) (princ) ) ; - 'defun SelectDoorsByStyle' ;; ------------------------------------------------------------------ (defun sdoors () (SelectDoorsByStyle (SearchForDoorStyle "Overheads - Sectional - 2100")) (princ) ) ;;; =========================================================== -------------------------- Alexander V. Koshman

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost