cancel
Showing results for 
Search instead for 
Did you mean: 

The edited Pose lists will not be saved with my net.api code

Valued Contributor
Valued Contributor

I copy a resource in Process Simulate Disconnected and add a new pose in the pose list. Then I save the resource. For this i use the net.API interface. My problem now is that the edit poselist ist not saved in the .jt which i make with code underneath.

Can you help me?

Maybe they see a bug in my code!

 

'Code add new Pose in Poselist

Dim l_joint As TxObjectList = l_Cto.PoseList

If l_joint.Count > 0 Then
Dim name As String = "R"
Dim poseData As New TxPoseData
Dim valuepose As ArrayList
valuepose = poseData.JointValues
If list(0).ToString = "Stift" Then
oeffnen = list(1)
valuepose.Add(oeffnen)
ElseIf list(0).ToString = "Spanner" Then
oeffnen = list(1) / 180 * System.Math.PI 'Umrechnen Rad in Grad
valuepose.Add(oeffnen)
End If
poseData.JointValues = valuepose
Dim instance As New TxPoseCreationData(name, poseData)
l_Cto.CreatePose(instance)
End If

 

'Code Save New Ressource 

Dim LibData As TxLibraryData = New TxLibraryData(ZielOrdner, name2)
If TypeOf storage Is TxLibraryStorage Then
Dim libStorage As TxLibraryStorage = TryCast(storage, TxLibraryStorage)
Dim localStorage As TxLocalStorage = libStorage.CopyToLocal
localStorage.SaveToLibrary(LibData)
ElseIf TypeOf storage Is TxLocalStorage Then
Dim localStorage As TxLocalStorage = TryCast(storage, TxLocalStorage)
localStorage.SaveToLibrary(LibData)
End If

2 REPLIES

Re: The edited Pose lists will not be saved with my net.api code

Siemens Phenom Siemens Phenom
Siemens Phenom

Dim instance As New TxPoseCreationData(name, poseData)

--> instance.CreateAtInstance = false

l_Cto.CreatePose(instance)

Re: The edited Pose lists will not be saved with my net.api code

Valued Contributor
Valued Contributor

Thank you! It works.