Automatic marking of used dynamic blocks

Automatic marking of used dynamic blocks

haincXE52B
Observer Observer
398 Views
4 Replies
Message 1 of 5

Automatic marking of used dynamic blocks

haincXE52B
Observer
Observer

Hi,
I'm designing water reservoirs and I thought of automating and simplifying the projection by defining what they (name, DN, PN, etc..) are with an attribute for specific fittings and fittings so that I can then have a finished bill of quantities using data extraction. But I would need to be able to describe individual blocks directly in the drawings. This means that I would need a script that extracts the attribute value from the block and writes it in the form of text next to the block. It would be best if the output was in the form of a multi-reference so that I could then reorganize the individual labels. I would also need the individual attribute values ​​​​to be separated by a dot and written on one line.

I ve tried several times, but it always showed some sort of error.. like "not enough real parametrs" or something like that " then i tried to do other stuff with it until it made mtext (it is in attachmets).

As a examle of final product i hoped to get something like this:

haincXE52B_0-1747315346743.png

this thing was made with inserting filed? not sure how is it called in english .. but shortcut is ctrl+F..

Is there way to make it look like this? Or am I just wasting my time with it

thank you kindly,

 

Martin 

 

0 Likes
Accepted solutions (1)
399 Views
4 Replies
Replies (4)
Message 2 of 5

paullimapa
Mentor
Mentor

No dwg or lisp files attached 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 5

Sea-Haven
Mentor
Mentor

Need a dwg as asked for, when making labels like this every label has an individual reference to an object, so you can not make one label and copy, without updating the linked ID. But yes can be done using a lisp. There will be 3 ID's required as your using attributes for the source. Every attribute has its own ID.

0 Likes
Message 4 of 5

haincXE52B
Observer
Observer

Yea, sorry i forgot ..
Here

0 Likes
Message 5 of 5

ВeekeeCZ
Consultant
Consultant
Accepted solution

Here's how to set these two variables correctly

 

(setq ptList (vlax-get ent 'InsertionPoint))
(setq pt (vlax-3d-point ptList))

 

The Mtext version should work as is, but it's better to rename the acad sys var to, e.g.acadobj. acad is a protected symbol.

 

 

 

FYI, this is why you should NEVER use diacritics in important identifiers as att tags are.

 

eekeeCZ_0-1747381458913.png

 

And here's a mod for fields.

 

        ((= attname "OZNACENI_VETVE") (setq att1 (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-objectid att)) ">%).Textstring>%")))
        ((= attname "TYP_OZNACENI") (setq att2 (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-objectid att)) ">%).Textstring>%")))
        ((= attname "PORADOVE_CISLO") (setq att3 (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-objectid att)) ">%).Textstring>%")))

 

0 Likes