Hi,
I tried to create panels grous using VBA/API and found this old subject: http://forums.autodesk.com/t5/robot-structural-analysis/create-group-of-bars-api/m-p/3590758/highlig...
I manage to make a code that seems to work:
Sub groupes_plaques()
'****************************************************************************************
'Group objects creation ***********************************************************
Dim robot As RobotApplication
Set robot = New RobotApplication
Dim group_name As RobotGroup
Dim idx As Integer
onglet = 'name of the sheet
nb_groups = Sheets(onglet).Range("nb_groupes") 'value in the sheet
For i = 1 To nb_groups
group_name = Sheets(onglet).Range("nb_groupes").Offset(i, -1)
num_plaques = Sheets(onglet).Range("nb_groupes").Offset(i, 0)
robot.Project.Structure.Groups.Create I_OT_PANEL, group_name, num_plaques
idx = robot.Project.Structure.Groups.Find(I_OT_PANEL, group_name)
Set group_name = robot.Project.Structure.Groups.Get(I_OT_PANEL, idx)
group_name.SelList = group_name.SelList + " 3"
'Group_1.SelList = Group_1.SelList + " 3"
group_name.Store
Next i
robot.Project.ViewMngr.Refresh
End Sub
Now, I'm trying to make appear / disappear groups.
For example, I'd like to display only the elements of the first goup.
Is there any way to do this? If yes, is it possible to have the beginning of the code please?
Thanks for answering,
VE
Hi,
Thanks for answering.
I don't find the command that allows me to display the desired group.
I guess it begins like this:
Dim recorded_view As IRobotView3
Set recorded_view = robot.Project.ViewMngr.GetView(1)
Could ou help me to continue the code please?
Thanks.
I think i'm going to make it like this!
Dim recorded_view As IRobotView3
Set recorded_view = robot.Project.ViewMngr.GetView(1)
recorded_view.Selection.Get(I_OT_PANEL).FromText ("group_name")
recorded_view.Redraw (True)
robot.Project.ViewMngr.Refresh
If I use this solution, i think it's useless to create groups...
recorded_view.Selection.Get(I_OT_PANEL).FromText (Group.SelList)
Can't find what you're looking for? Ask the community or share your knowledge.