I want to make some changes to an sketch in edition. So I have an sketch that is in edition, and I want to run a macro that detects which sketch is in edition and makes the desired changes.
How can I auto detect which sketch is in edition?
I want to make some changes to an sketch in edition. So I have an sketch that is in edition, and I want to run a macro that detects which sketch is in edition and makes the desired changes.
How can I auto detect which sketch is in edition?
Partial answer: First look at the value of CATIA.GetWorkbenchId. If it returns "CSOWKS" then the sketch editor is active.
If the sketch is in a Part body, thePart.InWorkObject will return the sketch being edited.
However, if the sketch is in a Geometrical Set, it will not (It returns the geometrical set containing the sketch). I am not sure how you determine the sketch in that case.
In my experience if you find yourself editing sketches with VB there is probably a better way.