how can I uncover Axis system
how can I uncover Axis system
(OP)
Hi,
I have Product with Parts and I want to select Part to uncover the Axis system. Unfortunately it does not work.
Sub CATMain()
Dim oSel As Selection
Set oSel = CATIA.ActiveDocument.Selection
oSel.Search "type:Axis System"
oSel.VisProperties.SetShow 0
oSel.Clear
End Sub
Best Regards
Santa
I have Product with Parts and I want to select Part to uncover the Axis system. Unfortunately it does not work.
Sub CATMain()
Dim oSel As Selection
Set oSel = CATIA.ActiveDocument.Selection
oSel.Search "type:Axis System"
oSel.VisProperties.SetShow 0
oSel.Clear
End Sub
Best Regards
Santa





RE: how can I uncover Axis system
CODE --> CATVBA
Sub CATMain() Dim oSel As Selection Set oSel = CATIA.ActiveDocument.Selection oSel.Clear oSel.Search ("'Part Design'.'Axis System'.Visibility=Visible, all") Dim visprop As VisPropertySet Set visprop = oSel.VisProperties visprop.SetShow catVisPropertyNoShowAttr oSel.Clear End Subindocti discant et ament meminisse periti
RE: how can I uncover Axis system
RE: how can I uncover Axis system
What is the error message?
This script will actually hide all visible axis.
to do the opposite you will have to modify the .search .setshow lines
indocti discant et ament meminisse periti
RE: how can I uncover Axis system
RE: how can I uncover Axis system
try with a new product with one or more catpart with axis in show
indocti discant et ament meminisse periti
RE: how can I uncover Axis system
RE: how can I uncover Axis system
CODE --> CATVBS
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: how can I uncover Axis system
Line 4 unselect all
line 6 oSel.search should select all visible axis
line 11 .setshow put selection in noshow
Let us know what does not work as expected
indocti discant et ament meminisse periti
RE: how can I uncover Axis system
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: how can I uncover Axis system
I have an opened Product with a lot of Parts. From the level of Product I need to select (in main window, not tree) any Part to uncover the Axis system.
RE: how can I uncover Axis system
You should enjoy the opportunity to learn a bit of VBA with your request.
keep us posted of your progress, we'll help you.
tips: from my script you need to avoid clearing the selection at the beginning and you need to tell the .search to look only in preselected element. The online doc should help you with that.
you can do it
indocti discant et ament meminisse periti