Automatic feature classification into geometrical set
Automatic feature classification into geometrical set
(OP)
Hi,
I would like to know if somebody has a method/script/macro to automate the classification of features into respective geometrical sets (CATIA V5).
Example : Creating a "Line" would put it under the geometrical set "Line" even if this particular geometrical set is not "defined in work object".
I group all reference elements independently from my surfaces so I can hide all the wire-frame geometry at once.
Alternately, a macro for showing/hiding all wire-frame geometry would work, but I would prefer to have the same features grouped together for the tree's sake.
Thank you very much
I would like to know if somebody has a method/script/macro to automate the classification of features into respective geometrical sets (CATIA V5).
Example : Creating a "Line" would put it under the geometrical set "Line" even if this particular geometrical set is not "defined in work object".
I group all reference elements independently from my surfaces so I can hide all the wire-frame geometry at once.
Alternately, a macro for showing/hiding all wire-frame geometry would work, but I would prefer to have the same features grouped together for the tree's sake.
Thank you very much





RE: Automatic feature classification into geometrical set
If I understood you well, that means after creating a feature (for example a line) you want to run a macro to pick-up the feature (line in this case) and put it in a specific GS (selected by you or predefined), isn't it ?
This can be done without problems.
Regards
Fernando
RE: Automatic feature classification into geometrical set
Thank you for your reply Fernando, much appreciated
RE: Automatic feature classification into geometrical set
Regards
Fernando
RE: Automatic feature classification into geometrical set
Regards
Fernando
RE: Automatic feature classification into geometrical set
Language="VBSCRIPT"
Sub CATMain()
Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument
Dim selection1 As Selection
Set selection1 = partDocument1.Selection
selection1.Search "CATPrtSearch.Line,all"
Dim part1 As Part
Set part1 = partDocument1.Part
CATIA.StartCommand "Change geometrical Set"
part1.Update
End Sub
Regards
Fernando
RE: Automatic feature classification into geometrical set
Source : Microsoft VBScript compilation error
Description : Expected end of statement
Statemenet : Dim partDocument1 As Document
I'm a newbie with scripts...
Thanks Fernando
RE: Automatic feature classification into geometrical set
Regards
Fernando
RE: Automatic feature classification into geometrical set
I've created some for planes, points, sketches also...
Where can I find the feature name's list to correctly designate the other one? (Spline or 3D curve perhaps)
Another quick question ; let's say I create an extrusion and I define the direction by creating a line within the extrusion direction's contextual menu. The line will be under the extrusion's node in the tree, hidden. That's fine by me... Is there a possibility to skip the features that are defined this way?
Again, thank you very much for your time
Best,
Mat
RE: Automatic feature classification into geometrical set
Second question: you have the possibility to exclude from a selection different things, you just need to find the criteria...maybe an example uploaded here it will be much helpful to find a solution.
The CATScript is done by simply recording and just add a StartCommand line at the end...is really nothing fancy...and for sure can be improved (in catvba, with graphic interface, buttons, less clicks, a.s.o.), you need just a little time - unfortunately I don't have now so much..
Regards
Fernando