Applying linear releases with API

Applying linear releases with API

Anonymous
Not applicable
266 Views
1 Reply
Message 1 of 2

Applying linear releases with API

Anonymous
Not applicable

I'm trying to apply linear releases to the all of the edges in a collection of panels (col); my code debugs but does not have any effect upon the panel releases. The label type Pinned  has already been defined within Robot. Can anyone suggest where I'm going wrong?

 

            For i = 1 To col.Count
                obj = col.Get(1)
                For j = 1 To obj.Main.Edges.Count

                    Dim objedge As RobotOM.IRobotObjEdge
                    objedge = obj.Main.Edges.Get(j)
                    objedge.SetLabel(RobotOM.IRobotLabelType.I_LT_LINEAR_RELEASE, "Pinned")

                Next j
            Next i
0 Likes
267 Views
1 Reply
Reply (1)
Message 2 of 2

Rafal.Gaweda
Autodesk Support
Autodesk Support

Example code

Dim Label As IRobotLabel

Set Label = robot.Project.Structure.Labels.Create(I_LT_LINEAR_RELEASE, "Hinged")
Dim LinRotula As IRobotLinearReleaseData
Set LinRotula = Label.Data
    LinRotula.UZ = I_LRDT_RELEASED
    LinRotula.RX = I_LRDT_RELEASED
    LinRotula.UZ = I_LRDT_RELEASED
robot.Project.Structure.Labels.Store Label

Dim LRS As RobotLinearReleaseServer
Set LRS = robot.Project.Structure.Objects.LinearReleases
LRS.Set 1, 2, 1, 1, "Hinged"


Rafal Gaweda
0 Likes