Dynamic Block Visibility State - Get value shown to user

Dynamic Block Visibility State - Get value shown to user

jhdempsey
Advocate Advocate
88 Views
0 Replies
Message 1 of 1

Dynamic Block Visibility State - Get value shown to user

jhdempsey
Advocate
Advocate

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".

jhdempsey_0-1749041993837.png

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?

0 Likes
89 Views
0 Replies
Replies (0)