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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Translate the entire conversation x

how to create extrude feature in part file

Aravind_98
6-Contributor

how to create extrude feature in part file

Hi team,

 

 

I've one doubt regarding to create a part file with extrude feature. just i need to create one simple extrude(rectangle) using Protoolkit.

 

if anybody knows pls help me.


ProError action_cb()
{
 
ProError err;
ProSolid mdl;
int window_id;
ProName Mdl_name;
string str = "Extrude";
ProStringToWstring(Mdl_name, (char*)str.c_str());
 
err = ProSolidMdlnameCreate(Mdl_name, PRO_MDLFILE_PART, &mdl);
err = ProWindowCurrentGet(&window_id);
err = ProWindowActivate(window_id);
 
 
return err;
 
}
 
 
extern "C" int user_initialize()
{
ProError err;
 
uiCmdCmdId action_id;
 
const char* msg_file = "Message.txt";
 
string str = msg_file;
 
ProFileName file_name;
ProStringToWstring(file_name, (char*)str.c_str());
 
 
err = ProMenubarMenuAdd((char*)"Model", (char*)"Model", (char*)"help", PRO_B_TRUE, file_name);
err = ProCmdActionAdd((char*)"test", (uiCmdCmdActFn)action_cb, uiProeImmediate, NULL, PRO_B_FALSE, PRO_B_TRUE, &action_id);
err = ProMenubarmenuPushbuttonAdd((char*)"Model", (char*)"Create", (char*)"Create", (char*)"Create", NULL, PRO_B_TRUE, action_id, file_name);
 
return err;
}
 
 
extern "C" void user_terminate()
{
 
}
ACCEPTED SOLUTION

Accepted Solutions
remy
21-Topaz I
(To:Aravind_98)

Hi

 

From a glance it looks like the code you shared  is a button that creates an extrude (but i did not read it in details).

 

After searching our knowledge base, most of the example rely on Element tree :

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

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

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

 

this article gives a sample code shipped with Creo :  <creo_toolkit_loadpoint>\protk_appls\pt_examples\pt_feature\TestExtrude.c

View solution in original post

2 REPLIES 2
remy
21-Topaz I
(To:Aravind_98)

Hi

 

From a glance it looks like the code you shared  is a button that creates an extrude (but i did not read it in details).

 

After searching our knowledge base, most of the example rely on Element tree :

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

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

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

 

this article gives a sample code shipped with Creo :  <creo_toolkit_loadpoint>\protk_appls\pt_examples\pt_feature\TestExtrude.c

Aravind_98
6-Contributor
(To:remy)

hi @remy 

Thank you.

Announcements

Top Tags