Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Start "Constraint" Command from VBA, how?

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):

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
 

Sponsor

Articles From 3DCAD World

Back
Top