Check listed features in treeview using API (Tree Traversing)

Check listed features in treeview using API (Tree Traversing)

Anonymous
Not applicable
689 Views
4 Replies
Message 1 of 5

Check listed features in treeview using API (Tree Traversing)

Anonymous
Not applicable

Hi,

 

I have a Planes (Front Plane ,Right Plane, Top Plane) and list of features (like Revolve1, Fillet1, Chamfer1 etc) in tree view (marked in red circle).

I need to check the those listed feature name and plane name in the treeview before creating the new plane and features.

 

How do I check those listed planes and features  using Inventor API?

キャプチャ.PNG

 

Regards,

Prarthana

 

0 Likes
690 Views
4 Replies
Replies (4)
Message 2 of 5

blair
Mentor
Mentor

Not really sure what you mean by "Checking".

 

Also it looks like upon the creation of this part, three work planes were added. Why not use the "Work Planes" that reside within the "Origin" Folder just above these created work planes along with the grounded Work Point at 0,0,0.

 


Inventor 2020, In-Cad, Simulation Mechanical

Just insert the picture rather than attaching it as a file
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Delta Tau Chi ΔΤΧ

0 Likes
Message 3 of 5

Anonymous
Not applicable

 

 

Thank you for your quick reply.

And Sorry Blair for the confusion.

 

What I need to do is How do I select work features by its name using Inventor API?

 

Regards,

Prarthana

0 Likes
Message 4 of 5

blair
Mentor
Mentor

This should help, it's listed for IV2017 but it's the same as IV2016 and IV2015.

 

http://help.autodesk.com/view/INVNTOR/2017/ENU/?guid=GUID-5B7BB5EF-1516-43AE-9C3A-FC5ACDC95555

 

 


Inventor 2020, In-Cad, Simulation Mechanical

Just insert the picture rather than attaching it as a file
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Delta Tau Chi ΔΤΧ

0 Likes
Message 5 of 5

Anonymous
Not applicable

Hi,

Thank you everyone but this is how I solved it by myself.

 

Code:

Entity swEnt = default(Entity);

swEnt = (Entity)vEntity;
SolidWorks.Interop.sldworks.PartDoc swPart = swApp.ActiveDoc;
string getPlaneName = swPart.GetEntityName(swEnt);

 

oWorkPlane = objInventorOperation.oCompDef.WorkPlanes[getPlaneName]; //This is for WorkPlane for Feature use WorkFeatures instead of WorkPlanes

objInventorOperation.oPartDoc.SelectSet.Select(oWorkPlane);                       // check whether it select the workplane that u want to

 

 

Regards,

Prarthana

0 Likes