Skip to main content
12-Amethyst
November 5, 2018
Solved

How to set model view with VB API?

  • November 5, 2018
  • 2 replies
  • 3492 views

Is there a way to set the model orientation to a named view using the VB API? All I can find in the docs is some information on drawing views.

I have an Excel spreadsheet set up as a model configurator, and need to set the view to "Default" or some other defined view after setting model parameters and regenerating.

Best answer by jkbaldania

Hi, please find mapkey string which can be called from VB API.

session.RunMacro("~ Command `ProCmdNamedViewsGalSelect`  `RIGHT`;")

 

Instead of "RIGHT", you can write your named view's name.

 

Regards,

Jaykishan

2 replies

1-Visitor
December 13, 2018

I guess there is no such VBAPI function. but you can send a Creo command with Mapkey in VB API, as a work around. 

1-Visitor
December 24, 2018

Hi, please find mapkey string which can be called from VB API.

session.RunMacro("~ Command `ProCmdNamedViewsGalSelect`  `RIGHT`;")

 

Instead of "RIGHT", you can write your named view's name.

 

Regards,

Jaykishan