Skip to main content
16-Pearl
August 23, 2016
Solved

Display drawing in CREO Window from Session memory

  • August 23, 2016
  • 2 replies
  • 1907 views

I tried to display drawing which available in session using following commands,

ProObjectwindowCreate(new_dwg_name,PRO_DRAWING,NULL);

ProMdlDisplay (drawing);

Drawing  displayed in CREO.Window, but hangs the session.

Please suggest me to solve this issue.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Best answer by GabrielZaha

In ProObjectwindowCreate function try to replace the NULL variable (last variable) with an integer:

ProObjectwindowCreate(new_dwg_name,PRO_DRAWING,&win_id);

Also I usually call ProVindowCurrentSet and ProWindowActivate after ProMdlDisplay. It should look something like this:

ProMdlNameGet(drawing,new_dwg_name);

ProObjectwindowCreate(new_dwg_name,PRO_DRAWING,&win_id);

ProMdlDisplay(drawing);

ProWindowCurrentSet(win_id);

ProWindowActivate(win_id);

2 replies

14-Alexandrite
August 23, 2016

In ProObjectwindowCreate function try to replace the NULL variable (last variable) with an integer:

ProObjectwindowCreate(new_dwg_name,PRO_DRAWING,&win_id);

Also I usually call ProVindowCurrentSet and ProWindowActivate after ProMdlDisplay. It should look something like this:

ProMdlNameGet(drawing,new_dwg_name);

ProObjectwindowCreate(new_dwg_name,PRO_DRAWING,&win_id);

ProMdlDisplay(drawing);

ProWindowCurrentSet(win_id);

ProWindowActivate(win_id);

16-Pearl
August 24, 2016

Hello Gabriel,

Your Code works fine. Thank you very much and also thanks for the Setting & Activating the Current window Tips.