Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

client graphics selection

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
NemKumar
526 Views, 2 Replies

client graphics selection

Hi,

 

I am creating a custom surfaceGraphics of a cube. I am not able to use Interaction Graphics ( it disappears as soon as it appears for some reason). I am using Nontransacting client graphics. So i have made surfaceGraphics.Selectable = true and surfaceGraphics.ChildrenAreSelectable = true. So when my mouse hovers over my cube, it shows face getting highlighted. When i click on the face and check the selectSet, the selectSet cout shows 1 entity but it is null.

 

How can I select my custom surfacegraphics and get the graphics node or face which was selected under the mouse click.?

 

 

Thanks in Advance

 

2 REPLIES 2
Message 2 of 3
ekinsb
in reply to: NemKumar

I'm guessing that the reason interaction graphics didn't work for you is because of how the variable referencing the InteractionEventsobject was declared.  If it was a local variable and went out of scope then the InteractionEvents is destroyed and any graphics associated with it are also destroyed.  I wrote a simple VBA test that I believe does what you described.  It creates a surface graphics box and allows the user to pick faces on the box.  The sample is attached.  To use it import the frmSurfGraphicsSelect.frm file into an existing VBA project.  It will create a new form.  If you run the form it will create the box and start selection. 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 3
NemKumar
in reply to: ekinsb

Thanks for your program.

 

At last I found the problem. I was creating my graphics using AddNonTranscting method. As soon as I changed to Add() method. The selection started working. 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report