RsTarget.ReferenceFrame and Undo
Dirka3
✭
Hello,
In my RS Add-in I am using using the Project.UndoContext to create an undo step that modifies and RsTarget's Transform, ReferenceFrame, and Attributes properties. When the user chooses to undo the modification the Transform and Attributes revert back to their original state, but the ReferenceFrame remains at the newly modified value. This same behavior can be observed using RsTarget.ShowReferenceFrame and the RS built in functionality for Translate Path, Rotate Path, etc. and using the undo mechanism.
In our application the ReferenceFrame is representing an important concept for us and ideally the undo step would consider it as well. Is this a bug that can be fixed? Or is this something we should work around by introducing our own ReferenceFrame Attribute?
Thanks!
-Levi
In my RS Add-in I am using using the Project.UndoContext to create an undo step that modifies and RsTarget's Transform, ReferenceFrame, and Attributes properties. When the user chooses to undo the modification the Transform and Attributes revert back to their original state, but the ReferenceFrame remains at the newly modified value. This same behavior can be observed using RsTarget.ShowReferenceFrame and the RS built in functionality for Translate Path, Rotate Path, etc. and using the undo mechanism.
In our application the ReferenceFrame is representing an important concept for us and ideally the undo step would consider it as well. Is this a bug that can be fixed? Or is this something we should work around by introducing our own ReferenceFrame Attribute?
Thanks!
-Levi
Tagged:
0
Comments
-
Hi Levi,
I think there is a bug and ReferenceFrame is not backed up correctly.
It should be possible to work around by setting any other property before setting the ReferenceFrame (except Transform because that actually changes the RsRobTarget).
E.g. something like thistarget.ShowName = !target.ShowName; // Causes all target properties to be backed up target.ShowName = !target.ShowName; // change back.. target.ReferenceFrame.Matrix = ...
Johannes Weiman
Software Engineer
RobotStudio Team, ABB Robotics0 -
Thanks so much for this suggestion! It is working well and will keep us moving forward.0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings