Derived solid visibility off - iLogic

Derived solid visibility off - iLogic

Anonymous
Not applicable
957 Views
11 Replies
Message 1 of 12

Derived solid visibility off - iLogic

Anonymous
Not applicable

Hey,

 

Recently we have been receiving files that when the solid of the part is derived its appears translucent (refer to image below) and also this appears on a drawing, as well as looks very messy in an assembly. I have two questions, is there an ilogic i can use to turn of all solid bodies from a derived parts in an open assembly. And is there anything that i can do in the settings to hide these features in drawings? 

 

 

Capture.JPG

0 Likes
958 Views
11 Replies
Replies (11)
Message 2 of 12

IgorMir
Mentor
Mentor

Hi Grant,

Try to apply the View Filter first.

Cheers,

Igor.View Filter.jpg

Web: www.meqc.com.au
0 Likes
Message 3 of 12

CCarreiras
Mentor
Mentor

Hi!

Question1: You can use "make components" tool in manage tab to turn multisolids into Assembly. Each solid will be a part.

 

Question 2, already awnswered above.

 

CCarreiras

EESignature

0 Likes
Message 4 of 12

GKPByDesign
Advocate
Advocate

This only works at a part and or assembly level, i need this to work at the drawing level. 

0 Likes
Message 5 of 12

GKPByDesign
Advocate
Advocate

The parts are created as serrate parts, and they used the derived surface bodies as reference, they do not create these using make components, i cannot change how these are made, as its external from this company, but i want to know if there is a quick way to turn them off, without having to go through every file. 

0 Likes
Message 6 of 12

IgorMir
Mentor
Mentor

Well, I am not really sure what the issue is. Even if a derived surface is visible in the part itself - upon creating the view that surface is not visible in that view. Can you share an example of the issue?

Regards,

Igor.

 


@GKPByDesign wrote:

This only works at a part and or assembly level, i need this to work at the drawing level. 

Web: www.meqc.com.au
0 Likes
Message 7 of 12

Anonymous
Not applicable

The attached image on my first post shows a large derived pat, for a part that is 5% the size of what you see in the image, if you place this in a drawing, it shows the derived part in the drawing of the part that is 5% the size. Make sense? The part in the image is a smaller white plastic cover 

0 Likes
Message 8 of 12

IgorMir
Mentor
Mentor

OK, the derived part has been created as a surface one and scaled up during the derive process. That's if I follow your description and the image you have posted earlier.  Without the actual file I can not add anything else to it.

Cheers,

Igor.

Web: www.meqc.com.au
Message 9 of 12

kelly.young
Autodesk Support
Autodesk Support

Hello @Anonymous if you are looking for an iLogic snippet this might help:

Set all surfacebodies to invisible. VBA code attached

iLogic - API access to Surface Bodies

 

Here are a few other good posts on how to turn the visibility off. 

turn off a surface in drawing view

Globally turn off surfaces in idw views

Hiding Surface Bodies in Drawing views by default?

 

The best might be to turn off all surfaces and create a Level Of Detail to reference from the drawing.

 

For iLogic inquiries post at Inventor Customization Forum for best results.

 

Please select the Accept as Solution button if a post solves your issue or answers your question.

0 Likes
Message 10 of 12

Anonymous
Not applicable

From one of the post there were multiple codes, but they were VBA, how do i get this to become an iLogic ule? 

 

Sub HideSurfacesInAsm()


'catch and skip errors
On Error Resume Next
'define the active assembly
Dim oAssyDoc As AssemblyDocument
Set oAssyDoc = ThisApplication.ActiveDocument
Dim oSurfacebody As WorkSurface

Dim Vis As Boolean
Dim result
result = MsgBox("Make all surfaces visible?", vbYesNoCancel)
Select Case result
    Case vbYes
        Vis = True
    Case vbNo
        Vis = False
    Case vbCancel
        Exit Sub
End Select

Dim oDoc As Inventor.Document

For Each oDoc In oAssyDoc.AllReferencedDocuments
    
    For Each oSurfacebody In oDoc.ComponentDefinition.WorkSurfaces
        oSurfacebody.Visible = Vis
    Next
Next
ThisApplication.ActiveDocument.Update

End Sub
0 Likes
Message 11 of 12

Lewis.Young
Collaborator
Collaborator

This should work with iLogic now:

 

SyntaxEditor Code Snippet

Sub Main()


'catch and skip errors
On Error Resume Next
'define the active assembly
Dim oAssyDoc As AssemblyDocument
oAssyDoc = ThisApplication.ActiveDocument
Dim oSurfacebody As WorkSurface

Dim Vis As Boolean
Dim result
result = MsgBox("Make all surfaces visible?", vbYesNoCancel)
Select Case result
    Case vbYes
        Vis = True
    Case vbNo
        Vis = False
    Case vbCancel
        Exit Sub
End Select

Dim oDoc As Inventor.Document

For Each oDoc In oAssyDoc.AllReferencedDocuments
    
    For Each oSurfacebody In oDoc.ComponentDefinition.WorkSurfaces
        oSurfacebody.Visible = Vis
    Next
Next
ThisApplication.ActiveDocument.Update

End Sub

 

Lewis Young
Windows 7 x64 - 32GB Ram
Intel Xeon E5-1620 v2 @ 3.70GHz
nVidia Quadro M2000 - 4GB
Inventor Professional 2017.3
Vault Basic 2017
3ds Max 2018

Message 12 of 12

emanuel.c
Collaborator
Collaborator

Updated to work from Part Document also:

 

Sub Main()

	'catch and skip errors
	On Error Resume Next
		
	Dim Vis As Boolean
	Dim result = MessageBox.Show("Yes" & vbCrLf & "No - Turn Visibility OFF" & vbCrLf & _
		"Cancel - Exit", "Make all surfaces visible?", MessageBoxButtons.YesNoCancel)
	Select Case result
	    Case vbYes
	        Vis = True
	    Case vbNo
	        Vis = False
	    Case vbCancel
	        Exit Sub
	End Select
	
	'define the active assembly
	Dim oAssyDoc As AssemblyDocument
	oAssyDoc = ThisApplication.ActiveDocument	
	Dim oDoc As Inventor.Document = ThisApplication.ActiveDocument
	DocType = oDoc.DocumentType
	Dim oSurfacebody As WorkSurface
	
	If DocType = DocumentTypeEnum.kAssemblyDocumentObject Then		
		For Each oDoc In oAssyDoc.AllReferencedDocuments		    
		    For Each oSurfacebody In oDoc.ComponentDefinition.WorkSurfaces
		        oSurfacebody.Visible = Vis
		    Next
		Next
	Else		
		For Each oSurfacebody In oDoc.ComponentDefinition.WorkSurfaces
		        oSurfacebody.Visible = Vis
		    Next
	End If

	ThisApplication.ActiveDocument.Update

End Sub
0 Likes