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.
Get current position in VB.net
Klaus
✭✭
in RobotStudio
How do i get the current TCP position i VB.net like the function CRobt() in rapid code
Best Regards
Klaus Soenderhegn
www.cadalysator.dk
Klaus Soenderhegn
www.cadalysator.dk
0
Comments
-
Hi
Something like this
Example just writes the x value to the logg window'VB
Public Sub Macro_CRobt()
Dim stn As Station = Project.ActiveProject
If stn Is Nothing Then Exit Sub
Dim tool As RsToolData = stn.ActiveTask.ActiveTool
Logger.AddMessage(New LogMessage(tool.Frame.GlobalMatrix.t.x.ToString()))End Sub
//C#
public void Macro_CRobT()
{
Station stn = Project.ActiveProject as Station;
if (stn == null) return;
RsToolData tool = stn.ActiveTask.ActiveTool;
Logger.AddMessage(new LogMessage(tool.Frame.GlobalMatrix.t.x.ToString()));
}Per Svensson
Robotics and Vision Specialist
Consat Engineering0
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
- 365 IRC5
- 86 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 854 RAPID Programming
- 38 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings