Inventor Customization

Inventor Customization

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

Export weldment Information incl geometrie

147 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,276
Registered: ‎06-12-2011
Message 2 of 2 (141 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

Autodesk Alert | We are currently working on restoring Previous Version License request access in the Autodesk Subscription Center. If you are a subscription customer and would like to request a Previous Version License, please use this link as a temporary workaround. We apologize for the inconvenience and thank you for your patience.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.