Hello,
my code is the following:
uint? WT = new uint(); Bentley.DgnPlatformNET.ElementPropertiesGetter propGet = new Bentley.DgnPlatformNET.ElementPropertiesGetter(Element); WT = propGet.Weight;
and the result is 0 ,although the weight is bylevel?
Does somebody has any idea?
Best regards
Axel
Hi Axel,
By default, it should return 0. Have you tried changing via property pane.
Thanks,
Mangesh
Hi Mangesh,
Mangesh.Shelar said:By default, it should return 0.
I am not sure how it's implemented in CE API, but historically when element property is "by level", -1 is returned.
When talking about ElementPropertiesGetter, how it can be checked whether a property (color, style, weight) is set to ByLevel?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Let me take this with my colleague, I will let you know soon. Thanks.
Jan Šlegr said:historically when element property is "by level", -1 is returned
Hmm. Then things have changed. I *do* see this enum:
enum { COLOR_BYLEVEL = 0xffffffff, COLOR_BYCELL = 0xfffffffe, STYLE_BYLEVEL = 0x7fffffff, STYLE_BYCELL = 0x7ffffffe, WEIGHT_BYLEVEL = 0xffffffff, WEIGHT_BYCELL = 0xfffffffe, LEVEL_BYCELL = 64, };
Maybe the variable is not "big" enough (e.g. UInt32) ?
Bruce Reeves SRNS said:Hmm. Then things have changed. I *do* see this enum:
Probably not, just my memory is not good enough ... and thinking about API in terms of GUI, where "by level" is -1 ;-)
But still the original Axel's question remains: Is it possible to evaluate using ElementGetter whether a property is "by level"?
Regards,