Export weldment Information incl geometrie

Export weldment Information incl geometrie

theo_bot
Advocate Advocate
624 Views
1 Reply
Message 1 of 2

Export weldment Information incl geometrie

theo_bot
Advocate
Advocate
Hi there, Does Anybody has Some experience with the api and weldments? we want to export weldinformation including geometry Information to XML. We Will import this in à weld automation program for weld robots. The basic weld information is accessible tru the api. For cosmetic weld we can extract the geometrie Information (start point, end point, type line or arc etc.) But the "solid weld" doesn't give us the info. Is there some experience About this?
0 Likes
625 Views
1 Reply
Reply (1)
Message 2 of 2

xiaodong_liang
Autodesk Support
Autodesk Support

Hope the code below helps:

 

Sub test()

Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument

Dim oAssDef As WeldmentComponentDefinition
Set oAssDef = oDoc.ComponentDefinition
 
Dim oSolidWeld As WeldBead
Dim oCosmeticWeld As CosmeticWeld

 

For Each oSolidWeld In oAssDef.Welds.WeldBeads  
  Dim oEachBeadFace As Face
  For Each oBeadFace In oSolidWeld.BeadFaces   
     
      'oBeadFace.Edges....
    
  Next
 
Next

For Each oCosmeticWeld In oAssDef.Welds.CosmeticWelds
 
  Dim oEdge As Edge
 
  For Each oEdge In oCosmeticWeld.Edges
    ' dump the info of the edge
  Next
 
Next
 
End Sub

0 Likes