I'm accessing Dimension.Style property, which leads to a DimStyle object, which is intended to hold specific dimension attributes ove general Style applied on a Dimension (also in other object types, like Balloon and so), as you can read from the docs.
The fun fact is that once I reach the DimStyle property, saving it to a variable, it always gets "disconnected" (as I can read when debugging) after a couple of instructions. I have tried different accesing methods with the sme result. For example:
Dim objDimStyle As SolidEdgeFrameworkSupport.DimStyle
Dim objDimension As SolidEdgeFrameworkSupport.Dimension
... 'Code were I get dimension to work with in variable objDimension ...
objDimStyle = objDimension.Style 'DimStyle and its properties can be accessed here, as expected
'More code where I play with DimStyle properties
If strKeepProperties IsNot Nothing AndAlso strKeepProperties.Count > 0 Then
'Once here, objDimStyle Properties seems to be disconnected, with no apparent reason! ... End If
If i use Solid Edge Spy to access that property on a draft, it craches as soon as I try to read the content of DimStyle, so this seems a bug on SE. Not sure if that happens in other versions.
I reported this issue awhile back on GitHub. See Selecting DimStyle causes ST8 crash. I didn't file an IR at the time because I wasn't sure if it was just my machine and it didn't happen in ST9. It seems like an API bug to me.