(API) Planar on contour - Text edition

(API) Planar on contour - Text edition

Anonymous
Not applicable
1,421 Views
13 Replies
Message 1 of 14

(API) Planar on contour - Text edition

Anonymous
Not applicable

Hi,

 

I would like to import a load table from Excel to Robot. This table is composed of  planar loads with contour.

However, in the Table Edition tab, contour definition can't be indicated automatically. We must define the coutour thanks to the user form:  

2.jpg

So I decided to create a database under Excel witch could be exported to the text edition tab, where the coutour can be directly indicated in the column load values:

3.jpg

The problem is that I don't know the correct syntax to adopt on Excel in order to import the table.

 

Sorry if this problem has already been resolved.

 

Thank you,

 

Erwann  

 

0 Likes
1,422 Views
13 Replies
Replies (13)
Message 2 of 14

Rafal.Gaweda
Autodesk Support
Autodesk Support

I am afriad it can be done only by macro \ API

See attached example xlses



Rafal Gaweda
0 Likes
Message 3 of 14

Anonymous
Not applicable

Well, i've used your examples to export my loads by macro.

However, in my case, Robot doesn't recognize these loads.

Indeed, for example, here are forces generated automatically when I create my planar load on Robot load table.

   1.jpg

And here are the same forces generated automatically when I import them from Excel thantks to macro. The caracteristics of the two planar loads on the load table are the same... 

2.jpg

Do you know what the problem is due to?

0 Likes
Message 4 of 14

Rafal.Gaweda
Autodesk Support
Autodesk Support
What is the problem? Scale of load symbol?
Check sum of reactions for these cases.


Rafal Gaweda
0 Likes
Message 5 of 14

Anonymous
Not applicable

Reactions tabs of my two cases are different too.

Here is the sum of reactions when I create my  load directly on Robot (which matches with what it should be). 

 

1.jpg

 

Here is the sum of reactions when I import the same load from Excel (macro).

2.jpg

 

And I don't know at all what 429.90 refers to...

0 Likes
Message 6 of 14

Anonymous
Not applicable

I've created an easier example: a 5mx5m planel with an unique load case.

I've imported a planar load on contour, and when I began the calculations, Autodesk sent me a warning... 

Sans titre.jpg 

 

How can the contour load be incorrect? Here is the geometry of my planel and the geometry of my load... Smiley Frustrated

 

Sans titr2e.jpgSans titre3.jpg

0 Likes
Message 7 of 14

Rafal.Gaweda
Autodesk Support
Autodesk Support
File please.


Rafal Gaweda
0 Likes
Message 8 of 14

Anonymous
Not applicable

Do it this evening.

Computers at work are blocking that... Smiley Frustrated

0 Likes
Message 9 of 14

Anonymous
Not applicable

Here they are!!

0 Likes
Message 10 of 14

Anonymous
Not applicable

Ok, I've understood where the problem came from:

 

In the macro you sent to me, I've added a line.

 

     Do While row <= Lastrow
       
        If (Cells(row, 1) <> "") Then
           
            ROSelection.FromText Str(Cells(row, 2))
            ROSelection.Exclude RBSelection
            ROSelection.Exclude RGSelection
           
            Set Simplecase = CaseServer.Get(CInt(Cells(row, 1)))
            Set rec_1 = Simplecase.Records.Create(I_LRT_IN_CONTOUR)
            rec_1.Objects.FromText Str(Cells(row, 2))
            rec_1.SetValue I_ICRV_PX1, CDbl(Cells(row, 3)) * 1000
            rec_1.SetValue I_ICRV_PY1, CDbl(Cells(row, 4)) * 1000
            rec_1.SetValue I_ICRV_PZ1, CDbl(Cells(row, 5)) * 1000
            rec_1.SetValue I_ICRV_NPOINTS, Int(Cells(row, 6))
            rec_1.SetVector 0, 0, 1
            rec_1.SetContourPoint 1, CDbl(Cells(row, 7)), CDbl(Cells(row, 8)), CDbl(Cells(row, 9))
            row = row + 1
        Else
            For K = 2 To rec_1.GetValue(I_ICRV_NPOINTS)
                rec_1.SetContourPoint K, CDbl(Cells(row, 7)), CDbl(Cells(row, 8)), CDbl(Cells(row, 9))
                row = row + 1
            Next K
        End If
    Loop
End Sub

 

And now, it works 😉

 

Thank you for your help.

 

Best regards,

 

Erwann

0 Likes
Message 11 of 14

Rafal.Gaweda
Autodesk Support
Autodesk Support
Perfect 🙂


Rafal Gaweda
0 Likes
Message 12 of 14

Anonymous
Not applicable

Same problem  [Incorrect definition of contour load for the load case 5.Panel no. 5 ]

 

Code :

'CHARGE SURFACIQUE contour
Set Charge_5 = RobApp.Project.Structure.Cases.CreateSimple(5, "Charge verticale surfacique sur contour", I_CN_PERMANENT, I_CAT_STATIC_LINEAR)
Su_TR = Charge_5.Records.New(I_LRT_IN_CONTOUR)


Set loadrecord = Charge_5.Records.Get(Su_TR)

loadrecord.Objects.FromText ("5")

loadrecord.SetValue I_ICRV_PX1, 0
loadrecord.SetValue I_ICRV_PY1, 0
loadrecord.SetValue I_ICRV_PZ1, -10000

loadrecord.SetValue I_ICRV_NPOINTS, 5

loadrecord.SetVector 0, 0, 1

loadrecord.SetContourPoint 1, -6.75, -9.3, 0
loadrecord.SetContourPoint 2, 6.75, -9.3, 0
loadrecord.SetContourPoint 3, 6.75, 9.3, 0
loadrecord.SetContourPoint 4, -6.75, 9.3, 0
loadrecord.SetContourPoint 5, -6.75, -9.3, 0

0 Likes
Message 13 of 14

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous 

 

Compare Your code with my examples above

I guess You should use loadrecord.SetValue I_ICRV_NPOINTS, 4 and define 4 points only

 



Rafal Gaweda
Message 14 of 14

Anonymous
Not applicable

Much thanks @Rafal.Gaweda  

0 Likes