Inventor Customization

Inventor Customization

Valued Contributor
Posts: 76
Registered: ‎09-30-2005
Message 1 of 2 (149 Views)

Export weldment Information incl geometrie

149 Views, 1 Replies
04-10-2012 11:27 AM
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?
ADN Support Specialist
Posts: 1,307
Registered: ‎06-12-2011
Message 2 of 2 (143 Views)

Re: Export weldment Information incl geometrie

04-12-2012 08:40 PM in reply to:

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   

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

Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!