How do I read Custom Properties/Attributes from an anonymous object?

How do I read Custom Properties/Attributes from an anonymous object?

jlobo2
Advocate Advocate
479 Views
1 Reply
Message 1 of 2

How do I read Custom Properties/Attributes from an anonymous object?

jlobo2
Advocate
Advocate

How do I read Custom Properties/Attributes from an anonymous object?

 

I can read the attributes of the object, but not sure how to read the below:

 

CustomProperites.jpg

 

Any help will be greatly appreciated.

0 Likes
480 Views
1 Reply
Reply (1)
Message 2 of 2

Civil3DReminders_com
Mentor
Mentor

Something like this: 

 

var blkRef = blkObjId.GetObject(OpenMode.ForWrite) as BlockReference;
foreach (DynamicBlockReferenceProperty dynProp in blkRef.DynamicBlockReferencePropertyCollection)
{
     if (dynProp.PropertyName == "Distance1")
     {
	dynProp.Value = (blkSetting.StartDistance * modelSpaceScale) + (pext.X * blkSetting.Multiplier);
	ed.WriteMessage("\nTextDist: " + pext.X);
	ed.WriteMessage("\nStartDist: " + blkSetting.StartDistance);
	ed.WriteMessage("\nTotatDist: " + dynProp.Value);
	break;
      }
}
Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
0 Likes