Michael Pieper

Workraound found to Update 3D Interconnect parts

Discussion created by Michael Pieper on Jan 21, 2019
Latest reply on Aug 30, 2019 by David Matula

Hi,

 

maybe this is helpful for somebody else.

 

While there is an interactive functionality to update an inserted 3D interconnect part, there is unfortunately currently no dedicated API way to do it. We were almost about to cancel a running project but luckily found a workaround for it:

 

The update can be initiated via selecting and setting the element in EditFeature or EditAssembly mode and pressing OK.

This can be archived with the following code:

 

Dim boolstatus as Boolean

Dim swModel as SldWorks.ModelDoc2

Dim catiaFnOnly as String = "blabla.CatPart"

 

 

       boolstatus = swModel.Extension.SelectByID2(catiaFnOnly, "BODYFEATURE", 0, 0, 0, False, 0, Nothing, 0)

 

          ' swCommands_EditFeature                         = 623
          ' swCommands_Edit_Assembly                    = 967
          ' swCommands_Ok_Command                     = 3042
          ' swCommands_Ok                                        = 766

 

          swApp.RunCommand(623, "")
          swApp.RunCommand(3042, "")

 

 

Hope that might help somebody else.

 

Regards,

Michael

Outcomes