Lukijan Posted August 28, 2012 Posted August 28, 2012 (edited) hello world! Is there any way to, well, expand DXF code list. I want to add some things to block but I don't want to add it by using attributes. what I want to make is something like this ((-1 . <Entity name: 719e5b0>) (0 . "INSERT") (5 . "16F") (67 . 0) (8 . "0") (410 . "Model") (62 . 256) (6 . "ByLayer") (370 . -1) (347 . <Entity name: 0>) (284 . 0) (48 . 1.00000) (60 . 0) (66 . 1) (2 . "_LC_I_300_p") (10 -114652. -74554.7 0.000000) (41 . 20.3568) (42 . -25.0545) (43 . 1.00000) (50 . 0.000266536) (70 . 1) (71 . 1) (44 . 0.000000) (45 . 0.000000) (210 0.000000 0.000000 1.00000) [color="red"](4000 . "SOMETHING")[/color]) I tried with (append (entget(car(entsel))) '((4998 . "SOMETHING"))) and I got ((-1 . <Entity name: 719e5b0>) (0 . "INSERT") (5 . "16F") (67 . 0) (8 . "0") (410 . "Model") (62 . 256) (6 . "ByLayer") (370 . -1) (347 . <Entity name: 0>) (284 . 0) (48 . 1.00000) (60 . 0) (66 . 1) (2 . "_LC_I_300_p") (10 -114652. -74554.7 0.000000) (41 . 20.3568) (42 . -25.0545) (43 . 1.00000) (50 . 0.000266536) (70 . 1) (71 . 1) (44 . 0.000000) (45 . 0.000000) (210 0.000000 0.000000 1.00000) (4998 . "SOMETHING")) but when I checked it with (setq a(entsel)) ;and select same block (setq alist (entget(car a))) I got only ((-1 . <Entity name: 719e5b0>) (0 . "INSERT") (5 . "16F") (67 . 0) (8 . "0") (410 . "Model") (62 . 256) (6 . "ByLayer") (370 . -1) (347 . <Entity name: 0>) (284 . 0) (48 . 1.00000) (60 . 0) (66 . 1) (2 . "_LC_I_300_p") (10 -114652. -74554.7 0.000000) (41 . 20.3568) (42 . -25.0545) (43 . 1.00000) (50 . 0.000266536) (70 . 1) (71 . 1) (44 . 0.000000) (45 . 0.000000) (210 0.000000 0.000000 1.00000)) Edited August 28, 2012 by Lukijan Quote
MSasu Posted August 28, 2012 Posted August 28, 2012 Seems that you are looking to add some user data to entities, is this correct? Please check in this the extended data management in AutoLISP help. You will also need to register an application name for your data (APPID table). Quote
Lee Mac Posted August 28, 2012 Posted August 28, 2012 Use xData, here is a tutorial: http://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-1.php Quote
Lukijan Posted August 28, 2012 Author Posted August 28, 2012 WOW! I expected some answers, but this is grate! Thank you very much! :D Quote
Lee Mac Posted August 28, 2012 Posted August 28, 2012 You're very welcome Lukijan. Depending on the quantity of data you need to store, you may also want to look into Dictionaries, as these have higher limits on the amount of data that may be stored. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.