Announcements

We are currently experiencing an issue impacting some Autodesk Products and Services - please refer to the Autodesk Health Dashboard for updates.

(API) add diferencial temperature in all longitudinal beams deck with excel vba

(API) add diferencial temperature in all longitudinal beams deck with excel vba

Anonymous
Not applicable
766 Views
4 Replies
Message 1 of 5

(API) add diferencial temperature in all longitudinal beams deck with excel vba

Anonymous
Not applicable

Hi

 

How I do for add simple case with diferencial temperature of 15º  in all longitudinal beams deck ?

 

Thanks

Regards

 

Márcio Teixeira

 

0 Likes
Accepted solutions (1)
767 Views
4 Replies
Replies (4)
Message 2 of 5

Artur.Kosakowski
Autodesk Support
Autodesk Support

1. Create a new load case

2. Define temperature load value in the load definition dialog

3. Select all beams you want to apply this load and copy their numbers to the list field of the load definition dialog

 

If you find your post answered press the Accept as Solution button please. This will help other users to find solutions much faster. Thank you.



Artur Kosakowski
0 Likes
Message 3 of 5

Anonymous
Not applicable

 

I show my code for the differential temperature:

 

 

Dim s As RobotSimpleCase
Dim l As RobotLoadRecord

 

Dim contador As Integer
Dim n As Double

 

Set s = robapp.project.Structure.Cases.CreateSimple(701, "Variação Diferencial Temperatura ", I_CN_TEMPERATURE, I_CAT_STATIC_LINEAR)

 

For contador = 0 To 13 Step 1
s.Records.New I_LRT_BAR_THERMAL           'it is correct for the differential temperature?
a = 2200101 + contador
Set l = s.Records.Get(1 + contador)
l.Objects.FromText a
l.SetValue I_BURV_PZ, 15                                 'and this line, how is?

Next

 

thank you again

 

Márcio Teixeira

 

 

 

0 Likes
Message 4 of 5

rsousa_
Advocate
Advocate
Accepted solution

 With simple change from tutorial,

Dim robapp As IRobotApplication
Set robapp = New RobotApplication
 
'   Generate new load case.
   Dim cas As IRobotSimpleCase
Set cas = robapp.Project.Structure.Cases.CreateSimple(robapp.Project.Structure.Cases.FreeNumber, _
"Case_1", I_CN_EXPLOATATION, I_CAT_STATIC_LINEAR)
 
'   Define load record types.
   cas.Records.New I_LRT_BAR_THERMAL

'   Get the first created load record
    Dim rec As IRobotLoadRecord
    Set rec = cas.Records.Get(1)
'Define the list of objects to which load will be applied.
   rec.Objects.FromText "7 8"
 
'   Define the type of thermal load.see robotbarthermalrecordvalues. You have to see if you want diferential temperature gradient in y or Z....
   rec.SetValue I_BTRV_TY, 15

'   Free previously declared variables.
Set rec = Nothing
Set cas = Nothing
Set robapp = Nothing

 

Is this ok for you?

0 Likes
Message 5 of 5

Anonymous
Not applicable

Perfect !

 

Thanks a lot

 

Best Regards

 

Márcio Teixeira

0 Likes