Message 1 of 4

Not applicable
09-07-2018
02:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
Here is my rule in ilogic,
'catch and skip errors On Error Resume Next 'define the active assembly Dim oAssyDoc As AssemblyDocument oAssyDoc = ThisApplication.ActiveDocument 'define Sb as solidbodies Dim SB As SurfaceBody 'define ShellB as a surfacebodies Dim ShellB As WorkSurface 'define Vis and Vis2 as boolean type Dim Vis As Boolean Dim Vis2 As Boolean 'choose solid or surface bodies If solidOrShell = "Solid" Then Vis = True Vis2 = False Else If solidOrShell = "Shell" Then Vis = False Vis2 = True End If Dim oDoc As Inventor.Document For Each oDoc In oAssyDoc.AllReferencedDocuments For Each SB In oDoc.ComponentDefinition.SurfaceBodies SB.Visible = Vis Next For Each ShellB In oDoc.ComponentDefinition.WorkSurfaces ShellB.Visible = Vis2 Next Next ThisApplication.ActiveDocument.Update
after i changed solid body to surface I would like to leave some elements as solid.
How can i do this ?
KS
Solved! Go to Solution.