I need to read the 'Dist Minimum' 'Dist Maximum' and 'Dist Increment' from an incremental Linear Parameter

I need to read the 'Dist Minimum' 'Dist Maximum' and 'Dist Increment' from an incremental Linear Parameter

kbrown58JUP
Participant Participant
283 Views
3 Replies
Message 1 of 4

I need to read the 'Dist Minimum' 'Dist Maximum' and 'Dist Increment' from an incremental Linear Parameter

kbrown58JUP
Participant
Participant

I have a dynamic block, basically a rectangle, with a stretch action attached to a linear Parameter called "Width". The parameter is set to operate incrementally.

 

I am writing a function which iterates through each possible "Width" based on information read from a custom config file. Before passing the new value to "Width", I want to verify that it is an acceptable value by comparing it to the 'Dist Minimum', 'Dist Maximum' and 'Dist Increment' values.

 

We can easily find the "Width" parameter with (vlax-invoke <block> 'GetDynamicBlockProperties) and (foreach... through the results until (vla-get-propertyname... matches "Width"; however, I cannot fathom how to read the min, max and increment values for it!

 

Thanks in advance!

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

Brock_Olly
Collaborator
Collaborator
Accepted solution

Unfortunately the AutoLISP/ActiveX API doesn't provide direct access to those constraint values of dynamic block parameters like it does for other entity data.
Depending on how many blocks you want to apply this to, you could hardcode the min-max values in your config file and go from there?

Message 3 of 4

kbrown58JUP
Participant
Participant

After three days of web searches, book reading and AI code suggestions, that's what I feared. I suppose I could fudge it by making each linear parameter a list type, but we use hundreds of blocks and I'd rather have avoided it.

 

Thank you for the confirmation, it's saved me any further frustration on that account at least.

0 Likes
Message 4 of 4

Brock_Olly
Collaborator
Collaborator

Perhaps someone smarter than me knows of another way, I would post it in the LISP forum though.