SirSkorpan
New member
Hi,
I'm trying to start the "Constraint" command (which should allow you to place a dimension to sketch elements in the Sketcher Workbench) from a VBA script.
I looked in the command list (view->commands list...) and found the names "Constraint" for the dimensioning tool and "Constraint..." for the "Constraint box" (which opens a box where you can set geometrical constraints, which is not what I want). I tried with this (the simplest case):
and I also tried writing "c:Constraint" in Catia's command field.
None of these attempts give me the Constraint command I'm looking for. Instead I get "Unavailable Command", but if I select the sketch element I want to constrain I get the "Constraint box".
How do I start the "Constraint" command (used for dimensions) from VBA instead of the "Constraint Box"?
Regards, Skorpan
I'm trying to start the "Constraint" command (which should allow you to place a dimension to sketch elements in the Sketcher Workbench) from a VBA script.
I looked in the command list (view->commands list...) and found the names "Constraint" for the dimensioning tool and "Constraint..." for the "Constraint box" (which opens a box where you can set geometrical constraints, which is not what I want). I tried with this (the simplest case):
Code:
Sub CATMain()
CATIA.StartCommand ("Constraint")
End Sub
and I also tried writing "c:Constraint" in Catia's command field.
None of these attempts give me the Constraint command I'm looking for. Instead I get "Unavailable Command", but if I select the sketch element I want to constrain I get the "Constraint box".
How do I start the "Constraint" command (used for dimensions) from VBA instead of the "Constraint Box"?
Regards, Skorpan