Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

3d Control Definitions not working.

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
248 Views, 3 Replies

3d Control Definitions not working.

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.

3 REPLIES 3
Message 2 of 4
JhoelForshav
in reply to: Anonymous

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.

Message 3 of 4
Anonymous
in reply to: JhoelForshav

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.

Message 4 of 4
JhoelForshav
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report