Advance Steel Forum
Welcome to Autodesk’s Advance Steel Forums. Share your knowledge, ask questions, and explore popular Advance Steel topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Folded beam "Stair Tread" creation in API

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
vinnieb
621 Views, 3 Replies

Folded beam "Stair Tread" creation in API

vinnieb
Enthusiast
Enthusiast

Is there any way at all to create a folded beam using any version of the API?

We have tried quite a few things and scoured all the forums and guides to no avail.

 

Trying to create a folded beam very similar to the way the straight stair macro does tread type 19. Or creating a folded beam from a polyline would work for us too. Actually any way or method would be helpful. I'm open to creating a user defined tread or a custom profile programmatically. Any solution would be great.

 

Please help!

Advance Steel user since 2008
0 Likes

Folded beam "Stair Tread" creation in API

Is there any way at all to create a folded beam using any version of the API?

We have tried quite a few things and scoured all the forums and guides to no avail.

 

Trying to create a folded beam very similar to the way the straight stair macro does tread type 19. Or creating a folded beam from a polyline would work for us too. Actually any way or method would be helpful. I'm open to creating a user defined tread or a custom profile programmatically. Any solution would be great.

 

Please help!

Advance Steel user since 2008
Tags (3)
3 REPLIES 3
Message 2 of 4
ChristianBlei
in reply to: vinnieb

ChristianBlei
Advisor
Advisor
Accepted solution

Hi,

 

a folded beam is in the API of Type UnfoldedStraightBeam which inherits from StraightBeam.

You pass a PolyLine3D to the constructor + the start point  and end point + the z Vector for the section orientation + the thickness of the beam + the portioning, 0 or 0.5 or 1 for the position of the section.

 

Public Shared Function TestUnfoldedBeam() As Boolean

DocumentManager.LockCurrentDocument()
Using tTrans As Transaction = TransactionManager.StartTransaction()
Try

Dim tStart As New Point3d(0, 0, 0)
Dim tEnd As New Point3d(4000, 0, 0)
Dim tThick As Double = 10
Dim tPortioning As Double = 0.5

Dim tPt1 As New Point3d(-500, -500, 0)
Dim tPt2 As New Point3d(-200, -500, 0)
Dim tPt3 As New Point3d(400, 1000, 0)
Dim tPt4 As New Point3d(400, 2000, 0)
Dim tVertices As Point3d() = New Point3d() {tPt1, tPt2, tPt3, tPt4}
Dim tBulges As Double() = New Double() {0, 0.1, 0.1, 0}
Dim tPoly As New Polyline3d(tVertices, tBulges)

Dim tBeam As New UnfoldedStraightBeam(tPoly, tStart, tEnd, Vector3d.kZAxis, tThick, tPortioning)
tBeam.WriteToDb()

Catch ex As Exception

Finally
tTrans.Commit()
End Try
End Using
DocumentManager.UnlockCurrentDocument()

Return True
End Function

 

HTH,

Christian

 

 

 

 

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw

Hi,

 

a folded beam is in the API of Type UnfoldedStraightBeam which inherits from StraightBeam.

You pass a PolyLine3D to the constructor + the start point  and end point + the z Vector for the section orientation + the thickness of the beam + the portioning, 0 or 0.5 or 1 for the position of the section.

 

Public Shared Function TestUnfoldedBeam() As Boolean

DocumentManager.LockCurrentDocument()
Using tTrans As Transaction = TransactionManager.StartTransaction()
Try

Dim tStart As New Point3d(0, 0, 0)
Dim tEnd As New Point3d(4000, 0, 0)
Dim tThick As Double = 10
Dim tPortioning As Double = 0.5

Dim tPt1 As New Point3d(-500, -500, 0)
Dim tPt2 As New Point3d(-200, -500, 0)
Dim tPt3 As New Point3d(400, 1000, 0)
Dim tPt4 As New Point3d(400, 2000, 0)
Dim tVertices As Point3d() = New Point3d() {tPt1, tPt2, tPt3, tPt4}
Dim tBulges As Double() = New Double() {0, 0.1, 0.1, 0}
Dim tPoly As New Polyline3d(tVertices, tBulges)

Dim tBeam As New UnfoldedStraightBeam(tPoly, tStart, tEnd, Vector3d.kZAxis, tThick, tPortioning)
tBeam.WriteToDb()

Catch ex As Exception

Finally
tTrans.Commit()
End Try
End Using
DocumentManager.UnlockCurrentDocument()

Return True
End Function

 

HTH,

Christian

 

 

 

 

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw
Message 3 of 4
vinnieb
in reply to: ChristianBlei

vinnieb
Enthusiast
Enthusiast

Thank you very much!

 

Side question for you. Do you know how to place the system line of the folded part into a specific location? For instance it would be tPt2 vertex of the part ,or fist bend of the folded beam.

Also tBulges being 0.1 really changes the parts geometry quite a bit. We set them all to 0 and we got a "correct" looking part. Took us a while to figure that one out.

 

Again thank you very much for the tip. You are a hero 🙂

Advance Steel user since 2008
0 Likes

Thank you very much!

 

Side question for you. Do you know how to place the system line of the folded part into a specific location? For instance it would be tPt2 vertex of the part ,or fist bend of the folded beam.

Also tBulges being 0.1 really changes the parts geometry quite a bit. We set them all to 0 and we got a "correct" looking part. Took us a while to figure that one out.

 

Again thank you very much for the tip. You are a hero 🙂

Advance Steel user since 2008
Message 4 of 4
ChristianBlei
in reply to: vinnieb

ChristianBlei
Advisor
Advisor

Hi,

 

My guess for the position of the system line (I have not tested that) is that the origin of the polyline UCS is always the position of thge system line. So you have to move the polyline....

To move the position of the system line into a specific location relativ to the section(to offset the section) you can use, inherited from StraightBeam

  • Public Property RefAxis As Autodesk.AdvanceSteel.Modelling.Beam.eRefAxis
  • Public Property Offsets As Autodesk.AdvanceSteel.Geometry.Vector2d

 

HTH, Christian

 

 

 

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw
0 Likes

Hi,

 

My guess for the position of the system line (I have not tested that) is that the origin of the polyline UCS is always the position of thge system line. So you have to move the polyline....

To move the position of the system line into a specific location relativ to the section(to offset the section) you can use, inherited from StraightBeam

  • Public Property RefAxis As Autodesk.AdvanceSteel.Modelling.Beam.eRefAxis
  • Public Property Offsets As Autodesk.AdvanceSteel.Geometry.Vector2d

 

HTH, Christian

 

 

 

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report