C++ API AddFile follow by Item.SetName not working- Printable Version +- RoboDK Forum (//m.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//m.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//m.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: C++ API AddFile follow by Item.SetName not working (/Thread-C-API-AddFile-follow-by-Item-SetName-not-working) |
C++ API AddFile follow by Item.SetName not working-flauzon-03-15-2022 When I use the API to import a step file into RDK and the following call I use a Item.SetName on the import file item, the rename is not working. Here is a link to step file causing the problem(not the only one):https://1drv.ms/u/s!AhCCWoYK5qdugpoRyD8FCFEaP1b3ZQ?e=NG5QJP And a code snippet I use to reproduce the bug. I notice that if the import file is big enough and that importing it takes some time, RDK seems to just ignore my SetName and name it using the step filename (axisinstead ofToto). When the step file is small, I don't have this bug. Thanks, François.
Code:
RoboDK_API::RoboDK *rdk=new RoboDK_API::RoboDK("",21500,"/NOSPLASH");
RE: C++ API AddFile follow by Item.SetName not working-flauzon-03-22-2022 This cause another problem too, more critical: when I use the AddFile() using a step file and a robot Item (I want to add a tool for a robot) and then I set the tool pose using:
Code:
Item::setPoseTool()
The pose is not set (probably override by RoboDK itself when the importation is completed) and the default pose of 0,0,200 is set instead. The name of the tool is also the wrong one since it is the same problem as this post originaly. RE: C++ API AddFile follow by Item.SetName not working-Albert-03-22-2022 Are you using the latest version of RoboDK? I'm unable to reproduce this issue with your axis file using the Python API. RE: C++ API AddFile follow by Item.SetName not working-flauzon-03-23-2022 (03-22-2022, 08:28 PM)Albert Wrote:Are you using the latest version of RoboDK? Hello Albert, yes I'm using the latest RoboDK version (5.4.1.22004 64 bits on Windows) and also the latest C++ API. The problem is that the AddFile() method return me the Item even if the file is not completely imported in RoboDK. So when I use the SetName method on the item received from the method, the file is still importing and I guess the method is not working or RoboDK rename the item after me with the name of the file imported. Here is a link (https://1drv.ms/v/s!AhCCWoYK5qdugppRgDZotfBvrB4OrA?e=sleZqQ) to the video showing what is going on, you can see from the application on the left that all operation regarding RoboDK C++ API are completed (at 27 sec) but RoboDK has only imported 5% of the step file at that point. RE: C++ API AddFile follow by Item.SetName not working-Albert-03-24-2022 今天我们固定这个问题。这个问题是特定的to the C++ API as we did not change the timeout. The latest version is now available on GitHub: https://github.com/RoboDK/RoboDK-API/ It was actually @Samwho pointed me in the right direction. RE: C++ API AddFile follow by Item.SetName not working-flauzon-03-25-2022 (03-24-2022, 08:27 AM)Albert Wrote:今天我们固定这个问题。这个问题是特定的to the C++ API as we did not change the timeout. The latest version is now available on GitHub: The fix worked! Thanks Albert and Sam, François RE: C++ API AddFile follow by Item.SetName not working-Sam-03-28-2022 Glad it worked, thanks for pointing that out! |