Displaying Dynamic Block Reference Properties as MText Fields

Displaying Dynamic Block Reference Properties as MText Fields

csandersonGKMZ9
Contributor Contributor
367 Views
0 Replies
Message 1 of 1

Displaying Dynamic Block Reference Properties as MText Fields

csandersonGKMZ9
Contributor
Contributor

Hi,

 

I'm fairly new to .NET so please excuse if this is a trivial problem or if my terminology is off in places.

 

I'm trying to write a command that, among several other tasks, displays the values of a dynamic block's custom parameters within a line of MText. I've been able to access the block's AttributeCollection and put those various attributes values into fields, and can access and display the custom length, rotation, etc., parameters via the DynamicBlockReferencePropertyCollection. My problem is that I cannot figure out a way to have any of the DynamicBlockReferenceProperty 's be associated with a field in the same way that I can with the block's attributes. The parameters within the dynamic blocks don't seem to have ObjectIDs in the same way that attribute definitions do, and I have not been able to find a way to convert a DynamicBlockReferenceProperty to an AttributeDefinition. 

 

My other idea was to write the field expression directly as a String into a field like this:

'%<\AcObjProp Object(%<\_ObjId XXXXXXXX>%).Parameter(XXX).UpdatedDistance \f "%lu6">%

 

Unfortunately the problem I ran into there was that the Parameter Index, bolded above, can vary from block to block and does not always represent the same parameter. Despite some extensive searching I haven't been able to come up with a way to determine those Parameter Indexes.

 

I'm not sure what I'm missing from either of these two methods, or if there is a third way I should attack this problem, but thank you in advance for any help.

0 Likes
368 Views
0 Replies
Replies (0)