Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.
Mirror
Thomas J
✭
How do you mirror an entity or part thru VBA - API?
Thomas H. Johnston
PACs Application Engineer
PACs Application Engineer
0
Comments
-
Hello Thomas,
There is a function in RobotStudio called mirror (you find it in the Modify menu); one way to call it could be to run the following macro from RobotStudio (will not work to run from inside VBA).
Sub Mirror()
Dim tfmTransform As New Transform
tfmTransform.x = 2.5
tfmTransform.y = 2.5
Dim prtPart As Part
Set prtPart = ActiveStation.Parts.Add
Dim entBox As Entity
Set entBox = prtPart.CreateSolidBox(tfmTransform, 0.5, 0.5, 0.5)
ActiveStation.Selections.RemoveAll
ActiveStation.Selections.Add entBox
Application.RSE.CommandBars("Menu Bar").Controls("Modify").Controls("Mirror...").Execute
SendKeys "100{TAB}100{TAB}{TAB}1000{TAB}1000{TAB}{TAB}{TAB}{TAB}1000{ENTER}"
End Sub
Good luck!
/UlrikaUlrika Mor?n37952,56615740740
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 16 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 366 IRC5
- 86 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 856 RAPID Programming
- 40 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings