07-03-2018
02:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-03-2018
02:50 AM
Dim oApp As Application
Dim oPD As PartDocument
Dim oPCD As PartComponentDefinition
Dim oSurfBody As SurfaceBody
oApp = ThisApplication
oPD = oApp.ActiveDocument
oPCD = oPD.ComponentDefinition
For Each oSurfBody In oPCD.SurfaceBodies
if Sliderail = "No" then
if oSurfBody.Name = "Sliderail, round" or oSurfBody.Name = "Sliderail, Square" then
oSurfBody.Visible = False
else
osurfbody.visible = true
End if
ElseIf Sliderail = "Round" Then
If oSurfBody.Name = "Round" Then
oSurfBody.Visible = True
else
oSurfBody.Visible = False
end if
ElseIf Sliderail = "Square" Then
If oSurfBody.Name = "Square" Then
oSurfBody.Visible = True
else
oSurfBody.Visible = False
End if
End if
Next
Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.
Autodesk Inventor Professional Certified 2014
Autodesk Inventor Professional Certified 2014