Public Sub CommandButton1_Click()
Dim RobApp As New RobotApplication
Cells(5, 1) = "Project"
Cells(5, 2) = RobApp.Project.Name
Dim RSel As RobotSelection
Set RSel = RobApp.Project.Structure.Selections.CreateFull(I_OT_PANEL)
Dim PanelCol As RobotObjObjectCollection
Set PanelCol = RobApp.Project.Structure.Objects.GetMany(RSel)
Dim X As RobotGeoPoint3D, Y As RobotGeoPoint3D, Z As RobotGeoPoint3D
Dim Obj As RobotObjObject
Set X = RobApp.CmpntFactory.Create(I_CT_GEO_POINT_3D)
Set Y = RobApp.CmpntFactory.Create(I_CT_GEO_POINT_3D)
Set Z = RobApp.CmpntFactory.Create(I_CT_GEO_POINT_3D)
For ii = 1 To PanelCol.Count
Set Obj = PanelCol.Get(ii)
Obj.Main.Attribs.GetLCS X, Y, Z
Cells(12 + ii, 3) = Obj.Number
Cells(12 + ii, 4) = "LCS X=" + Str(X.X) + ";" + Str(X.Y) + ";" + Str(X.Z)
Cells(12 + ii, 5) = "LCS Y=" + Str(Y.X) + ";" + Str(Y.Y) + ";" + Str(Y.Z)
Cells(12 + ii, 6) = "LCS Z=" + Str(Z.X) + ";" + Str(Z.Y) + ";" + Str(Z.Z)
Next ii
End Sub
Rafal Gaweda