Retrieve Info to create Field a Leader

Retrieve Info to create Field a Leader

Julio_Soto
Advisor Advisor
418 Views
3 Replies
Message 1 of 4

Retrieve Info to create Field a Leader

Julio_Soto
Advisor
Advisor

I want to create a leader that is linked to information about a block. So it looks like I need to get this ObjID information for the specific block. 

Julio_Soto_0-1712181766755.png

 

HOwever when I inspect the block I only see this

Julio_Soto_2-1712181866582.png

 

This does not look like the info I need.

 

 

Next I need the info the a specific lookup parameter. In this block the parameter name is "Length" but it shows up as "Parameter(68)" when I manually create a field. I don't think I can guarantee that this parameter is #68 every time.  I don't even know what that's base on because there are not 68 parameters in this block.  How can I get that parameter number?

 

 

0 Likes
Accepted solutions (2)
419 Views
3 Replies
Replies (3)
Message 2 of 4

Sea-Haven
Mentor
Mentor
Accepted solution

Ok the object id example 1st.

 

(setq obj (vlax-ename->vla-object (car (entsel "\nPick pline"))))
(setq id  (VLAX-INVOKE-METHOD (VLA-GET-UTILITY (VLA-GET-ACTIVEDOCUMENT  (VLAX-GET-ACAD-OBJECT))) 'GETOBJECTIDSTRING OBJ :VLAX-FALSE))

 

Not sure what object your picking is it an attribute ? If so use of Nentsel may be the way to go.

Message 3 of 4

Julio_Soto
Advisor
Advisor

that worked. now I just need a way to get the parameter #.  

I've read through LeeMacs Dynamic Block functions, but those return the value of a named parameter. I don't in those functions anything related to getting a "Parameter #"

https://www.lee-mac.com/dynamicblockfunctions.html

0 Likes
Message 4 of 4

Julio_Soto
Advisor
Advisor
Accepted solution

I found the solution in AUGI forums. Man, it would've taken forever to figure this one out. It was very helpful

 

https://forums.augi.com/showthread.php?117056-Create-Field-to-DB-Param-Pragramatically&p=1356168#pos...

0 Likes