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 activate the model with Creo Object TOOLKIT or TOOLKIT, which function can be activated?

NT_10507751
6-Contributor

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 11
sjuraj
13-Aquamarine
(To:NT_10507751)

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

NT_10507751
6-Contributor
(To:sjuraj)

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

sjuraj
13-Aquamarine
(To:NT_10507751)

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

Use ProWindowActivate() to activate the specified window

See application example:

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

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
NT_10507751
6-Contributor
(To:tbraxton)

Instead of activating the window, activate the model.

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.

 

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.

 

 

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

I have collected the quilt, but the creation feature cannot be selected.

You need provide more information about what you are trying to achieve. What you mean by "the creation feature cannot be selected"? Toolkit application must select models A and B, then user must to press button in GUI to create solidify feature?

FV
17-Peridot
17-Peridot
(To:YaroslavSin)

most likely OP had used ProFeature instead of feature's ProGeomitem while allocating quilt's ProSelection...

Top Tags