Skip to content

Commit

Permalink
Element.Geometry - allow snooping elements that only have view specif…
Browse files Browse the repository at this point in the history
…ic geometry
  • Loading branch information
NeVeSpl committed Oct 23, 2024
1 parent c4d15b3 commit c2bdfa9
Showing 1 changed file with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,21 @@ internal sealed class Element_Geometry : MemberAccessorByType<Element>, ICanCrea
CanBeSnooped = CanBeSnoooped(context.Document, element),
};
private static bool CanBeSnoooped(Document document, Element element)
{
var options = element.ViewSpecific ? new Options() { View = document.ActiveView } : new Options();
var geometry = element.get_Geometry(options);
var canBeSnooped = geometry != null;

return canBeSnooped;
{
if (element.ViewSpecific)
{
var options = new Options() { View = document.ActiveView };
var geometry = element.get_Geometry(options);
var canBeSnooped = geometry != null;
return canBeSnooped;
}
else
{
var geometry = element.get_Geometry(new Options());
var geometryViewSpecific = element.get_Geometry(new Options() { View = document.ActiveView });
var canBeSnooped = geometry != null || geometryViewSpecific != null;
return canBeSnooped;
}
}


Expand Down

0 comments on commit c2bdfa9

Please sign in to comment.