Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automated Transculent - Surfaces - STEP-file

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
513 Views, 3 Replies

Automated Transculent - Surfaces - STEP-file

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.

 

 

3 REPLIES 3
Message 2 of 4
Mike.Wohletz
in reply to: Anonymous

I think you will find what you are looking for in number 5 of this post.

Turn off Translucent using VBA

Message 3 of 4
Anonymous
in reply to: Mike.Wohletz

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.

Message 4 of 4
Mike.Wohletz
in reply to: Anonymous

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

 

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

Post to forums  

Autodesk Design & Make Report