Dear, I'm implementing a program wich adds new occurrences in an active assembly file and puts them in the neighbourhood where the user is actively working (eg last click release).
Therefore I first add the occurence and remove the ground constraint. At last I move the occurrence but i can't get the right mouse-coordinates:
Dim oSE As SolidEdgeFramework.Application
Dim oDoc As SolidEdgeDocument
Dim oAsm As SolidEdgeAssembly.AssemblyDocument
Dim oOccs As Occurrences
Dim oOcc As Occurrence
Dim oMouse As SolidEdgeFramework.Mouse
Dim oCommand As SolidEdgeFramework.Command
Dim oOccRels As SolidEdgeAssembly.Relations3d
Dim oOccRel As SolidEdgeAssembly.GroundRelation3d
Dim FileName As string
'calling solidedge application
Set oSE = GetObject(, "solidedge.application")
Set oDoc = oSE.ActiveDocument
If oDoc.Type = igAssemblyDocument Then
Set oAsm = oDoc
Set oOccs = oAsm.Occurrences
Set oCommand = oSE.CreateCommand(1)
Set oMouse = oCommand.Mouse
FileName = "M:\test.par"
Set oOcc = oOccs.AddByFilename(FileName)
Set oOccRels = oOcc.Relations3d
Set oOccRel = oOccRels.Item(1)
I'm under the impression that the values
oMouse.LastEventUpX, oMouse.LastEventUpY and oMouse.LastEventUpZ
aren't updated. That's why I think that is should do something with the mouseUp event in the mouse class.
Unfortunatly, I don't know anything about setting up costum events in VBA. Does anyone maybe have a good refference or have a little example for me?