Selecting load case in VBA when structure consists in many phases.

Selecting load case in VBA when structure consists in many phases.

Anonymous
Not applicable
383 Views
2 Replies
Message 1 of 3

Selecting load case in VBA when structure consists in many phases.

Anonymous
Not applicable
Dear Sir an Madam, I am working with a robot model that uses the phases option. There are seven phases in the model. Inside a VBA programm, I need to read the forces in some given bars. I usually use the following lines in order to select the load case I am interrested in : Dim ListOfCases As IRobotCaseCollection Dim CurrentCass As IRobotCase Set ListOfCases = RobApp.Project.Structure.Cases.GetAll() Set CurrentCase = ListeDesCas.Get(CaseNumber) If CaseNumber equals 1 (corresponding to the dead load of the first phase), everything works fine, but if CaseNumber equals 2001 (default case number that was copied from the first existing phase to the second phase), then I reveice the following error message : "&H80004005 2147467259 unspecified error". How can I proceed to select a load case when the structure is composed of many phases ? Best regards, Pierre Collé
0 Likes
Accepted solutions (1)
384 Views
2 Replies
Replies (2)
Message 2 of 3

Rafal.Gaweda
Autodesk Support
Autodesk Support
Accepted solution
Hint:
RobApp.Project.Structure.Cases.GetAll.Get (Index)
RobApp.Project.Structure.Cases.Get (CaseNumber)


Rafal Gaweda
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thank you for the hint and please apologize the layout of my last message. As you say, I was mixing up with index and case number. Everything works fine. Have a good day, Pierre Collé
0 Likes