Change Rep View of sub-assembly Pattern

Change Rep View of sub-assembly Pattern

Anonymous
Not applicable
461 Views
1 Reply
Message 1 of 2

Change Rep View of sub-assembly Pattern

Anonymous
Not applicable

Hello Community,

 

I need some Help...:)

 

I have an assembly (Lage_D) with a pattern of a subassembly (Teileraum) in it.

The pattern is created by a rule in the main assembly, the quanity of the pattern-objects is driven by the size of the subassembly.

 

If i manualy set the View rep to my specivic view, and the quantity of the pattern changes, the view rep of the new inserted subassemblys won t change!

 

Like to change the View Rep of each subassembly, in the pattern, by ilogic rule from the main assembly.

 

Found a lot of code dealing with this, but nothing fitts to my problem.(eg. "change viewrep in part ect." )

Tryed to change the code, but this dosent work properbly, my skills are to poor for this.

 

Pleas see the attached picture for more information

 

Thanks for help, will give kudos for every help!

 

Simon 

 

 

 

 

0 Likes
Accepted solutions (1)
462 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Hello Community,

 

Found the Solution for my own, combined the code for a REP change issue.

 

Sadly i can t give my selfe a kudo !

 

CODE:

 

SyntaxEditor Code Snippet

Dim asmDoc As AssemblyDocument
asmDoc = ThisApplication.ActiveDocument

Dim oMainAssyDef As AssemblyComponentDefinition
oMainAssyDef = asmDoc.ComponentDefinition

Dim oLODRep As DesignViewRepresentation
Dim doc As Document

For Each oOcc As ComponentOccurrence In oMainAssyDef.Occurrences

If oOcc.Suppressed Then Continue For
Try
If oOcc.DefinitionDocumentType _
= DocumentTypeEnum.kAssemblyDocumentObject Then
oOcc.SetDesignViewRepresentation("THE REP VIEW I NEED")
End If
Catch
End Try
Next




 THX 

 

Vladimir.Ananyev

 

Found the solution here:

 

 http://forums.autodesk.com/t5/inventor-customization/lod-of-subassemblies/m-p/4382034#M45893

0 Likes