Jump to content

Recommended Posts

Posted (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 by Lukijan
Posted

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).

Posted

WOW! I expected some answers, but this is grate! Thank you very much! :D :D :D

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...