I'm using an ElementPropertiesGetter. I can get a colour...
ElementPropertiesGetter
ElementPropertiesGetter propertiesGetter = new ElementPropertiesGetter (el); uint colour = propertiesGetter.Color;
So far, so good. But, if the element's colour is ByLevel, then how do I extract that info? I tried comparing to SpecialColor.ByLevel, but that's a negative number and Viz Studio complains about non-compatible types. Should I just cast my way out of trouble, or have I missed something?
ByLevel
SpecialColor.ByLevel
Similar questions apply to element weight and line-style.
In some cases, old Interop methods are better than new .NET methods. For example, the element property ApparentColor can directly get the displayed color we see. Just like MDL C function mdlElement_getEffectiveSymbology does.
Yongan.Fu said:In some cases, old Interop methods are better than new .NET methods
Good point! Certainly, ApparentColor provides a simple route to the desired result.
ApparentColor
However, when using an InterOp there's an overhead imposed by conversion (marshalling) between .NET and COM. When processing large numbers of elements that overhead creates a performance degradation.
Regards, Jon Summers LA Solutions