Insert part file in assembly

 

How to do it?

 

I would like to insert a part file into an assembly currently I use this:

 

doc.Occurrences.AddByFilename (partname)

 

this works, but the part is grounded after insert, I would like to see that the part is not grounded and that the user is asked to create relations.

 

Is there anyone that can help me?

 

Posted by: flavio flavio
Post date: 12/27/2006 8:10:40 AM

2 REPLIES

RE: Insert part file in assembly

Hello 097

 

Code fragment (+ See \Solid Edge V19\Custom\SELibrary)

 

global vars (+ objSEApp)

Private WithEvents objFileUIEvents As SolidEdgeFramework.ISEFileUIEvents_Event

Private sPlaceFileName As String

 

...

...

 

 

 

'*********************************************************************************************

Private Sub InsertPart(ByVal sFile As String)

If File.Exists(sFile) Then

sPlaceFileName = sFile

objFileUIEvents = CType(objSEApp.FileUIEvents, SolidEdgeFramework.ISEFileUIEvents_Event)

If Not (objFileUIEvents Is Nothing) Then

objSEApp.StartCommand(SolidEdgeFramework.SolidEdgeCommandConstants.seAssemblyPlacePartCommand)

objFileUIEvents = Nothing 'with events variable

End If

End If

End Sub

 

 

'*********************************************************************************************

Private Sub objFileUIEvents_OnPlacePartUI(ByRef FileName As String, ByRef AppendToTitle As String) Handles objFileUIEvents.OnPlacePartUI

On Error Resume Next

FileName = sPlaceFileName

End Sub

 

 

Pavel Janiga

 

 

Posted by: Pavel Janiga
Post date: 12/28/2006 5:25:04 AM

RE: Insert part file in assembly

thx, worked great!

 

Posted by: flavio flavio
Post date: 2/1/2007 3:47:51 AM