Slice Graphics and Look At programatically

Slice Graphics and Look At programatically

Anonymous
Not applicable
484 Views
1 Reply
Message 1 of 2

Slice Graphics and Look At programatically

Anonymous
Not applicable

 

Hi everybody,

 

When I manuall create a sketch in Inventor, I have it configured to automatically "look at" (set the camera perpendicular to it) and I can also use F7 to turn on and off the "Slice Graphcs" option.

 

Now, I'm creating a skecth from a VBA macro, and I'd like to be able to invoke the "look at" and "Slice Graphics" comands.

 

I have not been able to find any documentation regarding these 2 comands. Any help would be much appreciated.

 

Pablo 

0 Likes
485 Views
1 Reply
Reply (1)
Message 2 of 2

rogmitch
Advocate
Advocate

You could use the following to look at the sketch

 

Dim oPartDoc As PartDocument
Dim oSketch As PlanarSketch

 

oPartDoc.SelectSet.Select oSketch

Dim oControlDef As ControlDefinition
Set oControlDef = ThisApplication.CommandManager.ControlDefinitions.Item("AppLookAtCmd") 'Look at the sketch

oControlDef.Execute

DoEvents

 

I would guess "SketchSliceGraphicsCmd" for slicing the graphics although I have not tried this.

 

Good luck

 

Roger Mitchell

0 Likes