Community
Hello,
I need some help. I often get STEP-files where parts are transculent, these assemblies are large.
Can somebody help me coding VBA, so all parts in the assembly are switched off the transculent propertie?
Thanks in advance.
I think you will find what you are looking for in number 5 of this post.
Hello,
I tried the script you mention, before i did the post, but the script doesn't work. In fact it doesn't do anything.
So please who can advice me.
Try this and see if it works for you..
Private Sub TranslucentTest() Dim oDoc As Inventor.Document Set oDoc = ThisApplication.ActiveDocument Call TranslucentOff(oDoc) End Sub Function TranslucentOff(ByVal oDoc As Document) If oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then Dim oAssembly As Inventor.AssemblyDocument Set oAssembly = oDoc Dim oRefDoc As Inventor.Document For Each oRefDoc In oAssembly.AllReferencedDocuments Call TranslucentOff(oRefDoc) Next ElseIf oDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then Dim oPart As Inventor.PartDocument Set oPart = oDoc Dim oWorkSurface As Inventor.WorkSurface For Each oWorkSurface In oPart.ComponentDefinition.WorkSurfaces If oWorkSurface.Translucent = True Then oWorkSurface.Translucent = False End If Next End If End Function