cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How to set model view with VB API?

cstarnes
10-Marble

How to set model view with VB API?

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.

1 ACCEPTED SOLUTION

Accepted Solutions
jkbaldania
5-Regular Member
(To:cstarnes)

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

View solution in original post

2 REPLIES 2
mzhao
7-Bedrock
(To:cstarnes)

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

jkbaldania
5-Regular Member
(To:cstarnes)

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

Top Tags