Skip to main content
10-Marble
Jan 11, 2023 10:16 AM UTC
Question

How to activate the model with Creo Object TOOLKIT or TOOLKIT, which function can be activated?

How to activate the model with Creo Object TOOLKIT C++, which function can be activated?

 

Untitled.png

11 replies

15-Moonstone
Jan 11, 2023 10:34 AM UTC

you can select (put into selection buffer) feature and then run macro to activate model (~ Command `ProCmdMakeActive`)

Translate
10-Marble
Jan 12, 2023 12:23 AM UTC

After running the macro, the Toolkit program will lose control of CREO . So I can't use macros to activate.

Translate
15-Moonstone
Jan 12, 2023 4:31 AM UTC

I have not used c++ toolkit yet but in jlink there are 2 functions RunMacro (return handle to Creo) and ExecuteMacro (return handle to toolkit app)

if there is no such function in c++ TK you can try this trick:

register 2 commands with these functions;

1. do the stuff you need then run macro to activating the model and running second macro (eg ~ Command `ProCmdMakeActive`; ~ Command `MyCustomCommand`)

2. do the rest what you need

Translate
tbraxton
22-Sapphire II
Jan 11, 2023 11:00 AM UTC

Use ProWindowActivate() to activate the specified window

See application example:

https://www.ptc.com/en/support/article/CS288287

Translate
10-Marble
Jan 12, 2023 12:27 AM UTC

Instead of activating the window, activate the model.

Translate
17-Peridot
Jan 12, 2023 6:10 AM UTC

What do you want to do with active model?

To work with the model from the toolkit application, activation of the model is not required.

 

Translate
10-Marble
Jan 13, 2023 5:56 AM UTC

I want to cut the solid of component B with the quilt of component A .

Now I realize that I don't need to activate the model, but I failed to create the solidify feature because I couldn't select the quilt of component A.

 

 

Translate
17-Peridot
Jan 13, 2023 6:45 AM UTC

I think, pfcModelItemOwner::ListItems can help you to collect surfaces from A model.

Translate