Insert Part into Assy then FlashFit?

Im trying in bring a part file into an assembly, then have the user use the captured constraints (flash fit) to constrain the part (much like you would when adding a bolt from the standard parts library).


I've tried Assy.occurrence.AddByFileName("FileName.par), but it places the part grounded in the center of the assembly. The closest thing I found to do what I want is to add by file name, selectset.copy(), then delete the original occurrence, then do a StartCommand(57637) which is the paste command.


This works, how-ever it runs too fast and solid edge never removes the original part from the pathfinder, even tho the part no longer exists in the assembly.


So my options are.

1) find a way to copy the part directly onto the clipboard without opening the part, then pasting it into the assembly.

2) or find a way to place then flashfit.


Anyone able to help me out with this?


Posted by: David Van Doren
Post date: 9/26/2013 5:10:25 PM


Insert Part into Assy then FlashFit?

I did something like this recently. In essence, what you need to do is use StartCommand(seAssemblyPlacePartCommand), which doesn't take a file path.


You need to connect to the SE File UI events, and you supply the path to the part you want to add in the onPlacePartUI() method.


Posted by: Paul Dobson
Post date: 9/30/2013 5:59:02 AM