- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to define the Structural Axis for a 2D Frame. I want to assign labels at various X & Z axis positions which will be visible within the Structural Axis dialogue box.
With my current code, the structural axis is active upon opening the ROBOT file, and the defined labels are visible on import. However the labels are not 'loaded' into the Structural Axis dialogue. Additionally there is odd behaviour where the last label element of the Z-axis is being defined on a different basis (1-99) than the rest of the Z axis labels (A-Z).
Specific labels are not loaded into the structural axis dialogue box.
IRobotStructuralAxisGridMngr robotStructuralAxisGridMngr = _robotApplication.Project.AxisMngr;
IRobotStructuralAxisGridCartesian grid = (IRobotStructuralAxisGridCartesian)robotStructuralAxisGridMngr.Create(IRobotStructuralAxisGridType.I_SAGT_CARTESIAN, "Structure Axis");
grid.X.SetLabelFormat(IRobotStructuralAxisLabelType.I_SALT_123);
grid.Z.SetLabelFormat(IRobotStructuralAxisLabelType.I_SALT_ABC);
foreach(var label in structuralModel.labels.Z){
grid.Z.AddSequence(label.SequenceDistance, 0);
grid.Save();
}
foreach(var label in structuralModel.labels.X){
grid.X.AddSequence(label.SequenceDistance, 0);
grid.Save();
}
var gridIndex = robotStructuralAxisGridMngr.FindByName(grid.Name);
robotStructuralAxisGridMngr.Activate(gridIndex);
Appreciate any advice on how to achieve persistent import of Axis Labels & any other code improvements.
Thank you and regards,
Liam McHale
Solved! Go to Solution.