Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.
It appears like EditHoleCtxCmd is not apart of the 2019 Command Manager Control Definitions. Has this been replaced by another command or will it come back again? If it has gone the way of the dodo for good is there an alternate method to launch the 2019 Edit Feature command for holes.
EditFeatureWrapperCmd appears to do nothing.
T.I.A.
Nathaniel
Solved! Go to Solution.
Solved by nathaniel_dickerson. Go to Solution.
Solved by chandra.shekar.g. Go to Solution.
Try below VBA code to get hole edit dialog.
Sub Main()
Call CommandManager.ControlDefinition.Item("PartNGxHoleEditCtxCmd").Execute
End Sub
Thanks and regards,
This might be from the Hole command being replaced in 2019, try looking under the What's New section of the API help to see if there's a command to use as a replacement.
That worked. Thank You
The PartNGxHoleEditCtxCmd works with the code below, what
does the NGx stand for ( NewGoodness )?
Without a description of what this command does it is really
hard to tell that this a way to call the Edit Hole, or Edit Feature
as it is called in the UI.
Any chance that a supplemental document with command
descriptions completed could be made or the API CHM
updated with this information?
Public Sub test_PartNGxHoleEditCtxCmd() Dim pDoc As PartDocument Set pDoc = ThisApplication.ActiveDocument Dim hFeat As HoleFeature Set hFeat = pDoc.ComponentDefinition.Features.HoleFeatures.Item(1) pDoc.SelectSet.Select hFeat Dim oCntrlDefs As ControlDefinitions Set oCntrlDefs = ThisApplication.CommandManager.ControlDefinitions Dim oControlDef As ControlDefinition Set oControlDef = oCntrlDefs.Item("PartNGxHoleEditCtxCmd") Call oControlDef.Execute End Sub
After executing command through UI, run below VBA code to get active command name.
Sub PrintActiveCommandName() Debug.Print ThisApplication.CommandManager.ActiveCommand End Sub
Thanks and regards,
Due to the way that 2019 has changed the holes, I am needing a way to edit the holes that were created without a sketch in VBA without the dialog box ever showing. In other words, I just need the hole to update. It would be the equivalent of a RMC on the Hole feature, LMC on "Edit Feature" and then selecting the OK button in the dialog box that you have coming up in your code. I don't change anything in the dialog box. By just doing the edit and clicking on OK, it creates the sketch. When my code runs I don't want to see the dialog box, but I want the hole to update to where it has a sketch.
Can't find what you're looking for? Ask the community or share your knowledge.