Instigate feature edit via API

Instigate feature edit via API

MattH_Work
Collaborator Collaborator
280 Views
1 Reply
Message 1 of 2

Instigate feature edit via API

MattH_Work
Collaborator
Collaborator

I would like to edit a feature via the api.

By edit, I mean bring up the Fillet edit dialog, or Extrude edit, or Revolve or sweep or any other edit dialog. I do not wish to modify the feature by code, I just needs to access the features edit dialog, just the same as double clicking the feature in the browser, or RMB'ing and selecting 'Edit Feature'

I have the features name (by iterating the browser, and finding the relevant 'node'), i just need the equivalent of

 

For each oFeature in oApp.activedocument

   if oFeature.name = "My Feature" then

      oFeature.edit

      end if

next

 

I can use

oControlDef = oApp.CommandManager.ControlDefinitions.Item("EditExtrudeCtxCmd")
oControlDef.Execute()

 

But this only works with a single feature type, I would need an unknown amount of code, to deal with an unknown amount of different features types (fillets use EditFilletCtxCmd, Revolves use PartRevolveEditCtxCmd. The list goes on)

Also, with the extrusion example I get the edit feature dialog, but I dont get the 'live' preview, its more akin to the green wireframe preview of yesteryear

 

 

Can this be done?


MattH
Product Design Collection 2026
Vault Pro 2026
0 Likes
281 Views
1 Reply
Reply (1)
Message 2 of 2

perrysc
Enthusiast
Enthusiast

There's not an infinite number of feature types. It's quite few, actually. Just set up a case by case basis.

0 Likes