/*----------------------------------------------------------------------------- File: UgSolidLoadDisp.c Description: demo loading/displaying PTC File Date Version Author Vers Comment --------- ------- -------- ----- --------------------------------------------- 04-dec-97 H-02-02 AWY/CHI $$1 setup -----------------------------------------------------------------------------*/ #include #include #include #include #include #include #include UserLoadPart() { ProFamilyName name; ProMdl part; ProFileName msgfil; ProError err; int status; ProStringToWstring(msgfil,"msg_ugsolid.txt"); /*---------------------------------------------------------------------*\ Get the part name from the user \*---------------------------------------------------------------------*/ ProMessageDisplay(msgfil,"USER Enter the part name [QUIT] : "); err=ProMessageStringRead(PRO_FAMILY_NAME_SIZE,name); if (err!=PRO_TK_NO_ERROR) return(0); /*---------------------------------------------------------------------*\ Retrieve the part from disk \*---------------------------------------------------------------------*/ err=ProMdlRetrieve(name,PRO_PART,&part); /*---------------------------------------------------------------------*\ Check that the part was retrieved \*---------------------------------------------------------------------*/ if(err!=0) { ProMessageDisplay(msgfil,"USER Failed to retrieve part %0w.prt",name); return(0); } /*---------------------------------------------------------------------*\ Open a window and display the part in it. \*---------------------------------------------------------------------*/ ProObjectwindowCreate(name,PRO_PART,NULL); ProSolidDisplay(part); }