Message 1 of 1
Dynamic Block Visibility State - Get value shown to user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All
I am trying to get the value of the visibility state of a dynamic block. In the example shown below, I want to get the value "not flipped".
I have the following code which goes through the dynamic block properties and retrieves all their values, but for the visibility states, rather than returning the value the user sees ("not flipped") it returns the underlying integer value.
private static void AddDynamicBlockAttributes(Transaction tx, BlockReference block, List<ObjectProperty> properties)
{
var attributes = block.DynamicBlockReferencePropertyCollection.OfType<DynamicBlockReferenceProperty>();
properties.AddRange(attributes.Select(DynamicAttributeToObjectProperty));
return;
ObjectProperty DynamicAttributeToObjectProperty(DynamicBlockReferenceProperty attribute)
{
return new ObjectProperty(ObjectProperty.Attribute, attribute.PropertyName,
DataTypeText, attribute.Value.ToString());
}
}
I cant see anything anywhere that allows me to map that integer value to the text the user sees.
Can anyone help?