Posts: 5
Threads: 1
Joined: May 2023
Reputation:
0
I'm using the C# API, and struggling to get an item (body object such as STL) copied from one instance of RoboDK to another. I got the impression IItem.Clone was meant for exactly this, and can see the IItem's RoboDKServerPort is updated to the second RoboDK instance, but on trying to set the parent frame I get this error:
RoboDk.API.Exceptions.RdkException: 'Invalid item provided: The item identifier provided is not valid or it does not exist.'
I'm using the NuGet package v5.4.3, and RoboDK 5.6.0.
Thanks in advance.
Posts: 5
Threads: 1
Joined: May 2023
Reputation:
0
That doesn't seem to work, I assume because the Copy and Paste commands are specific to the IRoboDK instance - if I copy the item in instance 1 it pastes into instance 1 ok, but I get a different item (a duplicate of the frame, the only object in instance 2) if pasting into instance 2.
Posts: 2,454
Threads: 2
Joined: Apr 2018
Reputation:
133
05-24-2023, 12:57 AM
(This post was last modified: 05-30-2023, 11:53 AM byAlbert.)
Oh I understand... In this case it may be better to replicate the item from one instance to another.
What type of items are you planning to replicate?
For example, replicating a coordinate system is easy. But an object it is not so easy. We can help you implement both.
Posts: 5
Threads: 1
Joined: May 2023
Reputation:
0
Typically it would be the workpiece from CAD - the station can get very large and complex, so selecting points on the surface of the workpiece gets a bit cumbersome, and I sometimes get clicks assigned to the wrong object.
What do you mean by replicate sorry? If it's from the file I get that, but ideally I would be able to go from a station with the workpiece already populated to having just the workpiece in the second RoboDK instance.
Posts: 5
Threads: 1
Joined: May 2023
Reputation:
0
Is there anything I can do to help solve this from my side? We are paid license users if that makes any difference!
Thanks :)
Posts: 5
Threads: 1
Joined: May 2023
Reputation:
0
谢谢,我已经实现。:)
Sort of related (and probably not deserving a dedicated thread), I have been trying to mutate a point (change the arrow vector) - I can get the vector, but am struggling to change it. Is the intended workflow for this sort of thing to delete the item and create a fresh one with the desired parameters?