Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all.
I have just started a project with the API. I have been using VBA but this project will be developed using VB.NET.
The query is regarding how to access to the labels. I initialise the class as follows, previous importing RobotOM
Imports RobotOM
Public Class FunGen
Private Shared roboApp As New RobotApplication
Private Shared roboPro As RobotProject = roboApp.Project
Private Shared roboStr As RobotStructure = roboPro.Structure
Public Shared Function ColeccionLabelsLista(ByRef LABEL_TYPE As IRobotLabelType) As List(Of String)
Dim list As New List(Of String)
Dim colLabels As RobotLabelCollection
colLabels = roboStr.Labels.GetAll()
For i = 0 To colLabels.Count - 1
list.Add(colLabels.Get(i).ToString)
Next
Return list
End Function
End classThis function returns nothing because "labelCol" is empty. I am debugging with a model that have several labels and therefore, the variable should not be empty.
I would appreciate your support to know what is wrong.
Thanks in advance.
Solved! Go to Solution.