3d Control Definitions not working.

3d Control Definitions not working.

Anonymous
Not applicable
432 Views
3 Replies
Message 1 of 4

3d Control Definitions not working.

Anonymous
Not applicable

I am trying to create a macro to create 3D lines from a keyboard command.  However, the 3D control definitions do not work.

 

I can get a 2D line sketch to work with "SketchLineCmd".  But I cannot get a 3D line to work with "Sketch3DLineCmd" even though it is one of the control definitions.

 

Are 3D sketches definitions not supported using macros.

0 Likes
433 Views
3 Replies
Replies (3)
Message 2 of 4

JhoelForshav
Mentor
Mentor

Hi @Anonymous 

Works fine for me...

Just to make sure, you are in edit mode of a 3D-sketch while calling the command? Otherwise nothing will happen.

0 Likes
Message 3 of 4

Anonymous
Not applicable

That's the problem.  I have to be in 3d sketch to activate the curve to surface command.  What I want is a quick key that activates the 3d sketch and curve to surface command.

 

For example, if I activate the 2d line sketch quick key, it automatically activates the 2d sketch and line.

0 Likes
Message 4 of 4

JhoelForshav
Mentor
Mentor

Hi @Anonymous 

How about this rule then? 🙂

If TypeOf (ThisApplication.ActiveEditObject) Is Sketch3D = False
	Dim oSketch As Sketch3D = ThisApplication.ActiveDocument.ComponentDefinition.Sketches3D.Add()
	oSketch.Edit
End If
ThisApplication.CommandManager.ControlDefinitions("Sketch3DLineCmd").Execute
0 Likes