SelectionFilterEnum filter for hatch selecting with "Pick" iLogic command

SelectionFilterEnum filter for hatch selecting with "Pick" iLogic command

ReneRepina
Collaborator Collaborator
176 Views
4 Replies
Message 1 of 5

SelectionFilterEnum filter for hatch selecting with "Pick" iLogic command

ReneRepina
Collaborator
Collaborator

Hello.

 

Does anybody has know which filter ("SelectionFilterEnum") to use in "Pick" command from "CommandManager" (code below) to select only "Hatch" ("DrawingViewHatchRegion") or the part that has a "Hatch"?

I have a feeling that it is not possible / implemented, but I ask anyway if anybody may know this.

 

What we want to do is to run the iLogic rule, which has "Pick" command and we would click on "Hatches" we want to changed with specific parameters. Alternatively we could also click on the part that has a hatch, but first option is better.

 

Code example:

ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select object.")

 

ReneRepina_0-1763032524898.png

 

 

 

Best regards,

Rene Repina

0 Likes
Accepted solutions (1)
177 Views
4 Replies
Replies (4)
Message 2 of 5

cidhelp
Collaborator
Collaborator
Accepted solution

Hello @ReneRepina ,

 

there is rarely support for drawingview hatch-objects.

If you use kAllEntitiesFilter you can't select a hatch-object.

If you select a hatch at the UI and use Thisapplication.ActiveDocument.Selectset(1) you get Nothing!

 

I use Pick with kDrawingCurveSegmentFilter to get an DrawingCurveSegment.

From this you can get the DrawingCurve and furthermore the SurfaceBody and the DrawingView for the selected object.

Finally loop through the drawingview's HatchRegions and check if the hatchregion's SurfaceBody is the drawingcurve's SurfaceBody.

If thats True, you have the HatchRegion from the selected DrawingCurveSegment, yeah!

 

Message 3 of 5

ReneRepina
Collaborator
Collaborator

Hello @cidhelp .

 

Yes, I though so... ☹️

kAllEntitiesFilter --> I have tried that, but as you already said, no luck.
Thisapplication.ActiveDocument.Selectset(1) --> It is really strange this goes to "Nothing", since it is a "DrawingViewHatchRegion" object? Bug?

 

Thank you for answer and suggestion! I was going into this direction, but I did not want to. 😅

0 Likes
Message 4 of 5

cidhelp
Collaborator
Collaborator

Autodesk would say, thats not a bug it's "as designed, go to Idea Station..."

Message 5 of 5

ReneRepina
Collaborator
Collaborator

😂👌

0 Likes