How to show the model parametres in to assembly drawing.

How to show the model parametres in to assembly drawing.

Anonymous
Not applicable
447 Views
1 Reply
Message 1 of 2

How to show the model parametres in to assembly drawing.

Anonymous
Not applicable

Dear All,

 

i am working in one assembly. in that assembly i cretaed all the part with using i part & same part i called in to the assembly & created iassembly. while creating drawing  i have facing problem to show the model parameters in to the assembly drawing table.please let me know if any one knows how to link the model parameters in assemnly parameters with using i assembly.

 

please find the attached screen shot for your reference.

 

thank you for advance

 

regards,

Ramkrish.

 

 

0 Likes
448 Views
1 Reply
Reply (1)
Message 2 of 2

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

Can I understand you want to get the paramters of a part in an assembly, after the assembly is intserted to a drawing? If yes, the following code could help a bit:

 

Sub getPartParam()

Dim oDrwDoc As DrawingDocument
Set oDrwDoc = ThisApplication.ActiveDocument

'assume we want to check the first drawing view of
' the active sheet
Dim oView As DrawingView
Set oView = oDrwDoc.ActiveSheet.DrawingViews(1)

Dim oRefDoc As Document
Set oRefDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument

If TypeOf oRefDoc Is AssemblyDocument Then
    Dim oEachRefDocinAssDoc As DocumentDescriptor
    For Each oEachRefDocinAssDoc In oRefDoc.ReferencedDocumentDescriptors
      If TypeOf oEachRefDocinAssDoc.ReferencedDocument Is PartDocument _
      And oEachRefDocinAssDoc.ReferencedDocument.DisplayName = "Part1.ipt" Then
        
        Dim oPartDoc As PartDocument
        Set oPartDoc = oEachRefDocinAssDoc.ReferencedDocument
        
        Dim oParam As Parameter
        For Each oParam In oPartDoc.ComponentDefinition.Parameters
            If oParam.Name = "d0" Then
               ' get the parameter value
               Debug.Print oParam.Value
            End If
        Next
        
      End If
    Next
End If

End Sub

 

0 Likes