Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workplan visibility stays "ON" in Assembly

11 REPLIES 11
Reply
Message 1 of 12
4tpayne
479 Views, 11 Replies

Workplan visibility stays "ON" in Assembly

When I place my part into an assembly all the workplanes I used and turned visibility “off” from the part are remaining visible. This seems new in 2022 vs. 2021. In the past I was able to turn a WPlanes visibility on and off as needed and they would reflect the same state in the assembly. Now in 2022 even if all WPlanes are turned off in the part they all remain visible in the assembly. I am unable to turn them off for clean assembly.

11 REPLIES 11
Message 2 of 12
SharkDesign
in reply to: 4tpayne

In the assembly, right click the part, choose 'representation' select 'default' and tick 'associative.'

 

Try that. 

 

 

  Expert Elite
  Inventor Certified Professional
Message 3 of 12
4tpayne
in reply to: SharkDesign

I just checked that and the Associative check box is grayed out. This problem isn't only involving WPlanes. When I am deriving parts and using the Body as a work surface those are also staying visible in the assemblies. Feels like I missed a check box somewhere in options during setting up this new version. 

Message 4 of 12
4tpayne
in reply to: 4tpayne

I may have just found my own workaround. In the assembly at the top under the model tab are two options for “Assembly” and “Modeling” When I clicked on the modeling option it allowed me to drill down into the parts within that assembly and find the piece that was maintaining the visibility "On" state in that assembly. The issues I see is that for me it was a derived part that was showing the WPlanes and Worksurfaces visible even after I had turned them off in the separate derived part. Something was turning the visibility state back on as it was brought into the assembly. I don't remember having this issue in previous versions of Inventor. 

Message 5 of 12
johnsonshiue
in reply to: 4tpayne

Hi! James is right. After the subassembly is inserted, you can change Design View by using Representation command. Make sure "Associative" is checked.

Another place to change is to go to Tools -> App Options -> File -> File Open Defaults -> Assembly -> Design View -> select "Last Used" and check Associative.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 6 of 12
ferrisb
in reply to: 4tpayne

There are some good ilogic ways to do this.

 

'get user input
oInput = InputRadioBox("Select work feature visibility:", _
 "Turn ON work features for all components", _
 "Turn OFF work features for all components", "False", "iLogic")

' set a reference to the assembly component definintion.
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition

'Define the open document (top level assembly)
Dim openDoc As Document
openDoc = ThisDoc.Document
'define view rep
Dim oViewRep As DesignViewRepresentation
Dim sVRep as String
'change to something else if Default is used for something already
sVRep = "Default"

'create or activate view rep in the top level assembly
Try     
oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Item(sVRep).Activate    
Catch
'create new View Rep
oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Add(sVRep)
End Try

'create or activate view rep in subassemblies
Dim docFile As Document
For Each docFile In openDoc.AllReferencedDocuments                
Dim subDoc As AssemblyComponentDefinition
If docFile.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
subDoc = docFile.ComponentDefinition
Try     
subDoc.RepresentationsManager.DesignViewRepresentations.Item(sVRep).Activate    
Catch
'create new View Rep
subDoc.RepresentationsManager.DesignViewRepresentations.Add(sVRep)
End Try
Else
End If
Next

    'toggle work features in the open document (top level assembly)
    For Each oWorkPlane In openDoc.ComponentDefinition.WorkPlanes
    If oInput = True Then
    oWorkPlane.Visible = True
    ElseIf oInput = False Then
    oWorkPlane.Visible = False
    End If
    Next

    For Each oWorkAxis In openDoc.ComponentDefinition.WorkAxes
    If oInput = True Then
    oWorkAxis.Visible = True
    ElseIf oInput = False Then
    oWorkAxis.Visible = False
    End If
    Next

    For Each oWorkPoint In openDoc.ComponentDefinition.WorkPoints
    If oInput = True Then
    oWorkPoint.Visible = True
    ElseIf oInput = False Then
    oWorkPoint.Visible = False
    End If
    Next

'look at only the subassemblies
Dim subDocFile As Document
For each oCompOcc in oAsmCompDef.Occurrences
If oCompOcc.DefinitionDocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
oCompOcc.SetDesignViewRepresentation(sVRep,, True) 'True sets the view rep to be associative
Else
End If
Next


'Look at all of the files referenced in the open document
For Each docFile In openDoc.AllReferencedDocuments                

    'toggle work features in the components
    For Each oWorkPlane In docFile.ComponentDefinition.WorkPlanes
    If oInput = True Then
    oWorkPlane.Visible = True
    ElseIf oInput = False Then
    oWorkPlane.Visible = False
    End If
    Next

    For Each oWorkAxis In docFile.ComponentDefinition.WorkAxes
    If oInput = True Then
    oWorkAxis.Visible = True
    ElseIf oInput = False Then
    oWorkAxis.Visible = False
    End If
    Next

    For Each oWorkPoint In docFile.ComponentDefinition.WorkPoints
    If oInput = True Then
    oWorkPoint.Visible = True
    ElseIf oInput = False Then
    oWorkPoint.Visible = False
    End If
    Next
Next
iLogicVb.UpdateWhenDone = True
Message 7 of 12
ed57gmc
in reply to: 4tpayne

I'm having a similar problem. On some parts, when I place them in the assembly, all the work features are visible even though I turned them off in the part file. I can turn them off in the assembly, but what causes this behavior?

 

edit:

I opened one of the parts with this problem and noticed that the view rep was "Default". It seems that the part is getting inserted into the assembly using the "Master" view rep. So the question is more like, how can I get the assembly to insert the saved view rep?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 8 of 12
SharkDesign
in reply to: ed57gmc

Right click your part/assembly in the main assembly and check what
representation you have under view rep. This can do what you say is
happening.


  Expert Elite
  Inventor Certified Professional
Message 9 of 12
ed57gmc
in reply to: SharkDesign

Thx James,

Yes, I can do that to fix it after  placing, but how do I get it to place correctly in the first place? There must be some way to control it as it only does this on some parts.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 10 of 12
BDCollett
in reply to: ed57gmc


@ed57gmc wrote:

Thx James,

Yes, I can do that to fix it after  placing, but how do I get it to place correctly in the first place? There must be some way to control it as it only does this on some parts.


This setting will mean when you place a part in an Assembly it will pick that Design View.

 

Application Options - File - Options (File Open) -  Part.

BDCollett_0-1635890945015.png

 

 

 

Message 11 of 12
ed57gmc
in reply to: BDCollett

That is helpful. However, I think what my problem was, the assembly's view rep was "Master". I believe that was forcing the part to be "Master" or at least turning on all the part object's visibility. Correct?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 12 of 12
BDCollett
in reply to: ed57gmc


@ed57gmc wrote:

That is helpful. However, I think what my problem was, the assembly's view rep was "Master". I believe that was forcing the part to be "Master" or at least turning on all the part object's visibility. Correct?


That seems to be correct, even if you change a parts representation with the assembly set to "Master" it reverts back to the "Master" in the part. Master is always locked. This does seem a bit odd.

 

I will often try and always keep workplanes off in the Master of my parts and make new views with certain planes on if required. I have found in the past that the Master being locked sometimes does not allow you to do this though.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report