TAGGED: Ansys Discovery, scripting, selection
-
-
December 1, 2020 at 7:33 amdaniel.nouxetSubscriber
Hello,
I have to verify before launch a function if a point on a cuve or on an edge is available.
I start with the Sample exmple, PolygonMesh.cs:
protected override void OnUpdate(Command command) {
         command.IsEnabled = Window.ActiveWindow != null && Window.ActiveWindow.ActiveContext.SingleSelection is IDesignBody;
      }      protected override void OnExecute(Command command, ExecutionContext context, Rectangle buttonRect) {
         Window window = Window.ActiveWindow;
         if (window == null)
            return;         var desBody = window.ActiveContext.SingleSelection as IDesignBody;
         if (desBody == null)
            return;         DesignBody desBodyMaster = desBody.Master;
Â
But I don't understand.
I try to undertand thanks to theAPI, but the description are to light for me.
Â
Could you give me explanation ?
Regards.
-
December 1, 2020 at 10:07 amNaresh PatreAnsys Employee
Hello dNouxet
Help on API is available in the SpaceClaim_API.chm located in C:Program FilesANSYS Incv202scdmSpaceClaim.Api.V20 folder. There are some other library documents in this folder that you can check out. Other than this, I don't think there is any other documentation available.
-
- The topic ‘C# selection context’ is closed to new replies.
-
416
-
187
-
167
-
156
-
140
© 2024 Copyright ANSYS, Inc. All rights reserved.