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: 

How to turn Virtual parts on (purple icon) or off (gray icon) in browser view rep

9 REPLIES 9
Reply
Message 1 of 10
gcross
1722 Views, 9 Replies

How to turn Virtual parts on (purple icon) or off (gray icon) in browser view rep

gcross
Collaborator
Collaborator

I have created a couple virtual parts representing two types of  "Assembly Instructions A & Assembly Instructions B in an assembly with several view reps. I need particular virtual "Instruction" parts to show up only in certain View Reps. I just want the correct Instruction to show up in the parts list that has a View Rep filter on it.

 

How does one turn virtual parts on (purple icon) or off (gray icon) in the browser?

 

There is no RMB menu item that seems to apply when selecting virtual parts in the browser of an assembly.

0 Likes

How to turn Virtual parts on (purple icon) or off (gray icon) in browser view rep

I have created a couple virtual parts representing two types of  "Assembly Instructions A & Assembly Instructions B in an assembly with several view reps. I need particular virtual "Instruction" parts to show up only in certain View Reps. I just want the correct Instruction to show up in the parts list that has a View Rep filter on it.

 

How does one turn virtual parts on (purple icon) or off (gray icon) in the browser?

 

There is no RMB menu item that seems to apply when selecting virtual parts in the browser of an assembly.

9 REPLIES 9
Message 2 of 10
johnsonshiue
in reply to: gcross

johnsonshiue
Community Manager
Community Manager

Hi Gary,

 

Virtual components do not have geometry. As a result, there isn't a visibility to control. The only way to alter its quantity is by changing its BOM Structure property (Reference). It is either counted (non Reference) or discounted (Reference). For this case, you will need multiple assemblies to get multiple BOMs (PartsLists).

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

Hi Gary,

 

Virtual components do not have geometry. As a result, there isn't a visibility to control. The only way to alter its quantity is by changing its BOM Structure property (Reference). It is either counted (non Reference) or discounted (Reference). For this case, you will need multiple assemblies to get multiple BOMs (PartsLists).

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 3 of 10
A.Acheson
in reply to: johnsonshiue

A.Acheson
Mentor
Mentor

@gcross 

I assume the instructions are specific to the assembly and not a general instructions? Is this a production assembly that will be ultilized multiple time's or all one off's?

 

  • iLogic might be useful here by placing the instructions in a sketch symbol in the drawing environment then read the active view rep and add the sketch symbol required. This might get complicated quickly and is not as convenient as being contained where you building the model. You could also just read the instructions in from a text file and place on the drawing. 
  • You could also turn the visibility of the virtual part off in the parts list by using iLogic in the drawing  to detect the view rep and finding virtual parts and switching off appropriate one.
  • Looking at what Johnson suggested changing the virtual part to reference removes it from the parts list. The cleanest and quickest would be to use iLogic to change the virtual part to reference per view rep in the assembly. This way you don't deviate from perhaps your established workflow. 
If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan

@gcross 

I assume the instructions are specific to the assembly and not a general instructions? Is this a production assembly that will be ultilized multiple time's or all one off's?

 

  • iLogic might be useful here by placing the instructions in a sketch symbol in the drawing environment then read the active view rep and add the sketch symbol required. This might get complicated quickly and is not as convenient as being contained where you building the model. You could also just read the instructions in from a text file and place on the drawing. 
  • You could also turn the visibility of the virtual part off in the parts list by using iLogic in the drawing  to detect the view rep and finding virtual parts and switching off appropriate one.
  • Looking at what Johnson suggested changing the virtual part to reference removes it from the parts list. The cleanest and quickest would be to use iLogic to change the virtual part to reference per view rep in the assembly. This way you don't deviate from perhaps your established workflow. 
If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 4 of 10
gcross
in reply to: johnsonshiue

gcross
Collaborator
Collaborator

Johnson,

 

I don't want anything to appear in the editing/model window representing the virtual instructions, they are just some paper pages that do not need to be shown.

 

I only need a row listing in the part list with the virtual part iproperties.

 

I can do it easily by making a custom part in part list but this assembly has multiple variations in it controlled by view reps. Each view rep enables me to create a totally different drawing/part list. I need to use a view rep filter on each drawing's  part list. So I need to be able to turn the virtual part on or off in the browser only. If the browser icon is purple it's on & it's iproperties are visible in the part list even with a view rep filter on. But when the virtual part has a gray browser icon, it's off & virtual part iproperties do not show in part list.

 

It seems so simple & logical but there is no way I can find to turn the virtual part icon purple (on) or gray (off). That is all I need to do, it worked when I had only one virtual part. When I added a second virtual part, both virtual part browser icons turned gray & are not showing up in my part lists.

 

I just need a way to turn the virtual part on (purple icon) or off (gray icon) in the browser for each view rep in the IAM file.

 

Thanks, hope this makes sense.

Johnson,

 

I don't want anything to appear in the editing/model window representing the virtual instructions, they are just some paper pages that do not need to be shown.

 

I only need a row listing in the part list with the virtual part iproperties.

 

I can do it easily by making a custom part in part list but this assembly has multiple variations in it controlled by view reps. Each view rep enables me to create a totally different drawing/part list. I need to use a view rep filter on each drawing's  part list. So I need to be able to turn the virtual part on or off in the browser only. If the browser icon is purple it's on & it's iproperties are visible in the part list even with a view rep filter on. But when the virtual part has a gray browser icon, it's off & virtual part iproperties do not show in part list.

 

It seems so simple & logical but there is no way I can find to turn the virtual part icon purple (on) or gray (off). That is all I need to do, it worked when I had only one virtual part. When I added a second virtual part, both virtual part browser icons turned gray & are not showing up in my part lists.

 

I just need a way to turn the virtual part on (purple icon) or off (gray icon) in the browser for each view rep in the IAM file.

 

Thanks, hope this makes sense.

Message 5 of 10
gcross
in reply to: A.Acheson

gcross
Collaborator
Collaborator

Hi A. Acheson,


Thanks for the reply.

 

There are six assembly view reps & only two virtual part instructions.

 

If you read my response to Johnson you will see my goal is to have the iproperties of the one of the two virtual part "instructions" being visible in the part list depending on which view rep filters are turned on. Each view rep will be on a separate drawing IDW.


There seems to be an apparently half baked way virtual parts can be controlled in the browser by vanilla IV methods. A virtual part added into in an IAM shows a purple icon in the browser. The icon can also turn gray & be off in the browser & part list but I do not know how to control it on or turn it off.

 

That's all I'm after. If its not possible yet, then I'll put in a wish list request.

 

I saw a suggestion somewhere to just create an empty part.ipt instead of a virtual part & leave the origin point visible & it will allow for everything I need & could be reused. But I much prefer the cleanliness of no extra files & not having to constrain an exposed origin work point.

0 Likes

Hi A. Acheson,


Thanks for the reply.

 

There are six assembly view reps & only two virtual part instructions.

 

If you read my response to Johnson you will see my goal is to have the iproperties of the one of the two virtual part "instructions" being visible in the part list depending on which view rep filters are turned on. Each view rep will be on a separate drawing IDW.


There seems to be an apparently half baked way virtual parts can be controlled in the browser by vanilla IV methods. A virtual part added into in an IAM shows a purple icon in the browser. The icon can also turn gray & be off in the browser & part list but I do not know how to control it on or turn it off.

 

That's all I'm after. If its not possible yet, then I'll put in a wish list request.

 

I saw a suggestion somewhere to just create an empty part.ipt instead of a virtual part & leave the origin point visible & it will allow for everything I need & could be reused. But I much prefer the cleanliness of no extra files & not having to constrain an exposed origin work point.

Message 6 of 10
A.Acheson
in reply to: gcross

A.Acheson
Mentor
Mentor

@gcross 

 

Working with the drawing:

This iLogic code might suit your needs. It switches the visibility off  for the virtual part via part number when a drawing view rep is changed. You might be able to set this up in a drawing template if the view reps and virtual part number are the same. 

 

Correction on previous post I mentioned  it might be possible to control the virtual part  by changing it from a default to reference Bom Structure per view rep in the assembly. This is not possible.

 

To Use the below code run from a drawing file as an external or internal rule. Change the Text in red to the Part Number and View Rep Name required. This will only do two variations but if you need more try and follow the pattern and add in more variations. 

 

It is only looking at the view on the current sheet where the parts list is so this may not work if your set up is different, if it doesn't work we can modify to the workflow you are using.   

 

'https://forums.autodesk.com/t5/inventor-forum/ilogic-rule-scanning-partslist-rows/td-p/5184691
'Unable to capture current view rep of drawing, set view rep then check name
'https://forums.autodesk.com/t5/inventor-customization/api-get-the-quot-design-view-representation-quot-name-from-a/td-p/6335821
 
 'Get File Doc
Dim doc As Document
doc = ThisApplication.ActiveDocument
'Check This is a drawing file
If doc.DocumentType <> kDrawingDocumentObject Then
	MessageBox.Show("This is Not a drawing file, Exiting.", "iLogic")
Return
End If 
'We have the Drawing Doc
 Dim oDrawDoc As DrawingDocument
    oDrawDoc = doc
	
'[Change Virtual part and View Rep Here
Dim VirtPart1 As String = "Component1"    'Place virtual part (partnumber)Here
Dim VirtPart2 As String = "Component2"    'Place virtual part (partnumber)Here
Dim ViewRepName1 As String = "1"          'Place view rep Name Here
Dim ViewRepName2 As String = "2"          'Place view rep Name Here
']

' Set a reference to the drawing document.
' This assumes a drawing document is active.



' Set a reference to the active sheet
Dim oActiveSheet As Sheet
oActiveSheet = oDrawDoc.ActiveSheet
Dim oDrawingView As DrawingView

'[Look through each view in the sheet in order to detect active view rep
For Each oDrawingView In oActiveSheet.DrawingViews
''Set Drawing View Rep by providing a string value
' oDrawingView.SetDesignViewRepresentation("2", True) 'Relating to Assembly View rep'True =Associative,False = Not Associative

 Try
 ActViewRepDraw = ActiveSheet.View(oDrawingView.Name).View.ActiveDesignViewRepresentation
 'MessageBox.Show(ActViewRepDraw, "iLogic-Active View Rep")
 
 Catch
	 MessageBox.Show("Associativity of view is switched off!Cannot read Active View rep!", "iLogic")
 End Try

Next
']

'[Control the Partslist Item Visibilty
' Set a reference to the first parts list on the active sheet.
' This assumes that a parts list is on the active sheet.
Dim oPartList As PartsList
oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1)
   
' Iterate through the contents of the parts list.
Dim i As Long
For i = 1 To oPartList.PartsListRows.Count
'look at only the part number column
oCell  = oPartList.PartsListRows.Item(i).Item("PART NUMBER")
	
	If ActViewRepDraw = ViewRepName1
		'find a specific value
		If oCell.Value = VirtPart2 Then 
		'hide the row
			oPartList.PartsListRows.Item(i).Visible = False
		Else
			oPartList.PartsListRows.Item(i).Visible = True
	End If

	ElseIf ActViewRepDraw = ViewRepName2
		'find a specific value
		If oCell.Value = VirtPart1 Then 
		'hide the row
		oPartList.PartsListRows.Item(i).Visible = False
		Else
			oPartList.PartsListRows.Item(i).Visible = True
		End If
		Else
			MessageBox.Show("Drawing view rep not changing PartList", "iLogic")
	End If
Next
']

'Homework It was raining
'[[Get Model View Reps

'Dim oAssyDoc As AssemblyDocument
'oAssyDoc = ThisDrawing.ModelDocument

'Dim oAsmCompDef As AssemblyComponentDefinition
'oAsmCompDef = oAssyDoc.ComponentDefinition 
''define view rep collection
'Dim oViewReps As DesignViewRepresentations
'oViewReps = oAsmCompDef.RepresentationsManager.DesignViewRepresentations

''define view rep 
'Dim oViewRep As DesignViewRepresentation

''define an arraylist to hold the list of  view rep names
'Dim NameList As New ArrayList()

''create a list of view reps
'For Each oViewRep In oViewReps
'	NameList.Add(oViewRep.Name)
'Next

''ViewRepName = InputListBox("Prompt", NameList, d0, Title := "Title", ListName := "List")
''MultiValue.SetValueOptions(True, DefaultIndex := 0)
''Put them In a Parameter If needed To control By form
''MultiValue.List("ViewRep") = NameList

''Active view rep Of the model
'ActViewRepModel = oAsmCompDef.RepresentationsManager.ActiveDesignViewRepresentation
'MessageBox.Show(ActViewRep.Name, "iLogic")

']

 

 

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan

@gcross 

 

Working with the drawing:

This iLogic code might suit your needs. It switches the visibility off  for the virtual part via part number when a drawing view rep is changed. You might be able to set this up in a drawing template if the view reps and virtual part number are the same. 

 

Correction on previous post I mentioned  it might be possible to control the virtual part  by changing it from a default to reference Bom Structure per view rep in the assembly. This is not possible.

 

To Use the below code run from a drawing file as an external or internal rule. Change the Text in red to the Part Number and View Rep Name required. This will only do two variations but if you need more try and follow the pattern and add in more variations. 

 

It is only looking at the view on the current sheet where the parts list is so this may not work if your set up is different, if it doesn't work we can modify to the workflow you are using.   

 

'https://forums.autodesk.com/t5/inventor-forum/ilogic-rule-scanning-partslist-rows/td-p/5184691
'Unable to capture current view rep of drawing, set view rep then check name
'https://forums.autodesk.com/t5/inventor-customization/api-get-the-quot-design-view-representation-quot-name-from-a/td-p/6335821
 
 'Get File Doc
Dim doc As Document
doc = ThisApplication.ActiveDocument
'Check This is a drawing file
If doc.DocumentType <> kDrawingDocumentObject Then
	MessageBox.Show("This is Not a drawing file, Exiting.", "iLogic")
Return
End If 
'We have the Drawing Doc
 Dim oDrawDoc As DrawingDocument
    oDrawDoc = doc
	
'[Change Virtual part and View Rep Here
Dim VirtPart1 As String = "Component1"    'Place virtual part (partnumber)Here
Dim VirtPart2 As String = "Component2"    'Place virtual part (partnumber)Here
Dim ViewRepName1 As String = "1"          'Place view rep Name Here
Dim ViewRepName2 As String = "2"          'Place view rep Name Here
']

' Set a reference to the drawing document.
' This assumes a drawing document is active.



' Set a reference to the active sheet
Dim oActiveSheet As Sheet
oActiveSheet = oDrawDoc.ActiveSheet
Dim oDrawingView As DrawingView

'[Look through each view in the sheet in order to detect active view rep
For Each oDrawingView In oActiveSheet.DrawingViews
''Set Drawing View Rep by providing a string value
' oDrawingView.SetDesignViewRepresentation("2", True) 'Relating to Assembly View rep'True =Associative,False = Not Associative

 Try
 ActViewRepDraw = ActiveSheet.View(oDrawingView.Name).View.ActiveDesignViewRepresentation
 'MessageBox.Show(ActViewRepDraw, "iLogic-Active View Rep")
 
 Catch
	 MessageBox.Show("Associativity of view is switched off!Cannot read Active View rep!", "iLogic")
 End Try

Next
']

'[Control the Partslist Item Visibilty
' Set a reference to the first parts list on the active sheet.
' This assumes that a parts list is on the active sheet.
Dim oPartList As PartsList
oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1)
   
' Iterate through the contents of the parts list.
Dim i As Long
For i = 1 To oPartList.PartsListRows.Count
'look at only the part number column
oCell  = oPartList.PartsListRows.Item(i).Item("PART NUMBER")
	
	If ActViewRepDraw = ViewRepName1
		'find a specific value
		If oCell.Value = VirtPart2 Then 
		'hide the row
			oPartList.PartsListRows.Item(i).Visible = False
		Else
			oPartList.PartsListRows.Item(i).Visible = True
	End If

	ElseIf ActViewRepDraw = ViewRepName2
		'find a specific value
		If oCell.Value = VirtPart1 Then 
		'hide the row
		oPartList.PartsListRows.Item(i).Visible = False
		Else
			oPartList.PartsListRows.Item(i).Visible = True
		End If
		Else
			MessageBox.Show("Drawing view rep not changing PartList", "iLogic")
	End If
Next
']

'Homework It was raining
'[[Get Model View Reps

'Dim oAssyDoc As AssemblyDocument
'oAssyDoc = ThisDrawing.ModelDocument

'Dim oAsmCompDef As AssemblyComponentDefinition
'oAsmCompDef = oAssyDoc.ComponentDefinition 
''define view rep collection
'Dim oViewReps As DesignViewRepresentations
'oViewReps = oAsmCompDef.RepresentationsManager.DesignViewRepresentations

''define view rep 
'Dim oViewRep As DesignViewRepresentation

''define an arraylist to hold the list of  view rep names
'Dim NameList As New ArrayList()

''create a list of view reps
'For Each oViewRep In oViewReps
'	NameList.Add(oViewRep.Name)
'Next

''ViewRepName = InputListBox("Prompt", NameList, d0, Title := "Title", ListName := "List")
''MultiValue.SetValueOptions(True, DefaultIndex := 0)
''Put them In a Parameter If needed To control By form
''MultiValue.List("ViewRep") = NameList

''Active view rep Of the model
'ActViewRepModel = oAsmCompDef.RepresentationsManager.ActiveDesignViewRepresentation
'MessageBox.Show(ActViewRep.Name, "iLogic")

']

 

 

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 7 of 10
MartinJezek
in reply to: johnsonshiue

MartinJezek
Participant
Participant

Hi John,

 

Here, I would like to bring to your attention this behavior which slightly contradicts your statement about the visibility control of virtual parts. While it is true that the command is not directly accessible, the virtual parts still participate in workflows which toggle visibility or have visibility as a parameter. Namely: Isolate Components; Select All invisible components; Representations -> All visible

 

Please, take a look at the following set of screenshots showing a disruption in a workflow.

 

1: Virtual part is placed

Virtual-visibility-toggle-1.png

 

2: Components participating in a constraint isolated

Virtual-visibility-toggle-2.png

 

3: Virtual part gets greyed out as if it was invisible too

Virtual-visibility-toggle-3.png

 

4: Selecting All invisible components includes the virtual component!!

Virtual-visibility-toggle-6.png

Virtual-visibility-toggle-5.png

 

5: As the virtual component does not have the visibility control, it disables the option for all parts!

Virtual-visibility-toggle-4.png

 

6: The only way back is through this workaround:

Virtual-visibility-toggle-7.png

 

7: Set up again.

Virtual-visibility-toggle-8.png

 

 

Please, provide some feedback on this. Is that known limitation or something? In my opinion, this seems a bit half-baked and would require some revision.

 

 

Thank you.

 

Best Regards,

Martin Jezek

0 Likes

Hi John,

 

Here, I would like to bring to your attention this behavior which slightly contradicts your statement about the visibility control of virtual parts. While it is true that the command is not directly accessible, the virtual parts still participate in workflows which toggle visibility or have visibility as a parameter. Namely: Isolate Components; Select All invisible components; Representations -> All visible

 

Please, take a look at the following set of screenshots showing a disruption in a workflow.

 

1: Virtual part is placed

Virtual-visibility-toggle-1.png

 

2: Components participating in a constraint isolated

Virtual-visibility-toggle-2.png

 

3: Virtual part gets greyed out as if it was invisible too

Virtual-visibility-toggle-3.png

 

4: Selecting All invisible components includes the virtual component!!

Virtual-visibility-toggle-6.png

Virtual-visibility-toggle-5.png

 

5: As the virtual component does not have the visibility control, it disables the option for all parts!

Virtual-visibility-toggle-4.png

 

6: The only way back is through this workaround:

Virtual-visibility-toggle-7.png

 

7: Set up again.

Virtual-visibility-toggle-8.png

 

 

Please, provide some feedback on this. Is that known limitation or something? In my opinion, this seems a bit half-baked and would require some revision.

 

 

Thank you.

 

Best Regards,

Martin Jezek

Message 8 of 10
johnsonshiue
in reply to: MartinJezek

johnsonshiue
Community Manager
Community Manager

Hi Martin,

 

Many thanks for sharing the findings! I am sorry I was not thorough enough. Indeed, the behaviors are inconsistent. The VC can be made invisible by Design View commands but there isn't a Visibility toggle in the context menu. I will need to work with the project team to understand the behavior better. It looks like a bug to me.

Thanks again!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer

Hi Martin,

 

Many thanks for sharing the findings! I am sorry I was not thorough enough. Indeed, the behaviors are inconsistent. The VC can be made invisible by Design View commands but there isn't a Visibility toggle in the context menu. I will need to work with the project team to understand the behavior better. It looks like a bug to me.

Thanks again!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 9 of 10
gcross
in reply to: johnsonshiue

gcross
Contributor
Contributor

Hi Johnson,

 

Has there been any progress on resolving the Virtual part control issue?

 

I'm on Inventor version 2024 & I am still struggling with virtual parts that are grayed out in view reps & do not show up in part lists associated with the view reps. The iLogic fix is too complicated would not work for my application.

 

The only way to get VC icons to turn purple (& show up in parts lists) in other view reps is to unlock & turn visibility on for all parts in the v rep. But, of course, that defeats the purpose of the v rep.

0 Likes

Hi Johnson,

 

Has there been any progress on resolving the Virtual part control issue?

 

I'm on Inventor version 2024 & I am still struggling with virtual parts that are grayed out in view reps & do not show up in part lists associated with the view reps. The iLogic fix is too complicated would not work for my application.

 

The only way to get VC icons to turn purple (& show up in parts lists) in other view reps is to unlock & turn visibility on for all parts in the v rep. But, of course, that defeats the purpose of the v rep.

Message 10 of 10
gcross
in reply to: gcross

gcross
Contributor
Contributor

I found a work around that will make all the Virtual Component (VC) part icons purple in all the view reps (so VC shows up in part lists). But you cannot be using a Ballooned Items Only filter in the parts list.

 

  • Delete the original VC (& copy it's description).
  • Unlock all the affected View Reps.
  • Create a new VC  (pasting in the copied description). Edit the iProperties
  • Re-Lock all the View Reps

 

0 Likes

I found a work around that will make all the Virtual Component (VC) part icons purple in all the view reps (so VC shows up in part lists). But you cannot be using a Ballooned Items Only filter in the parts list.

 

  • Delete the original VC (& copy it's description).
  • Unlock all the affected View Reps.
  • Create a new VC  (pasting in the copied description). Edit the iProperties
  • Re-Lock all the View Reps

 

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

Post to forums  

Autodesk Design & Make Report