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.
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.
Jhoel Forshav
Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website
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.
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
Jhoel Forshav
Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website
Can't find what you're looking for? Ask the community or share your knowledge.