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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

another jlink question -OpenFile opens multiple windows

lylebeidler
1-Newbie

another jlink question -OpenFile opens multiple windows

Can anyone tell me why this section opens 2 windows?





--



Lyle Beidler
MGS Inc
178 Muddy Creek Church Rd
Denver PA 17517
717-336-7528
Fax 717-336-0514
<">mailto:-> -
<">http://www.mgsincorporated.com>
2 REPLIES 2

Sorry - I inadvertently sent that the first time.



Can anyone tell me why this section opens 2 windows?



String partName =
modelFileName.substring(0,modelFileName.length()-4);

partName = partName + ".prt";



ModelType modelParttype =
ModelType.MDL_PART;

ModelDescriptor descriptor;



descriptor =
pfcModel.ModelDescriptor_Create(modelParttype, partName,null);

com.ptc.pfc.pfcWindow.Window
partWindow = session.OpenFile(descriptor);

partWindow.Activate();

partWindow.Repaint();





--



Lyle Beidler
MGS Inc
178 Muddy Creek Church Rd
Denver PA 17517
717-336-7528
Fax 717-336-0514
<">mailto:-> -
<">http://www.mgsincorporated.com>
bfrandsen
6-Contributor
(To:lylebeidler)

Hi Lyle
Appears to me the Activate() and Repaint methods might be redundante when
using the OpenFile() method. Are you using asynchonous mode, as Activate()
only works in that mode according to the documentation.
You could get a more simple code by using the
ModelDescriptor_CreateFromFileName() method when creating your
ModelDescriptor.

/Bjarne



Lyle Beidler <->
07-12-2010 20:06
Please respond to
Lyle Beidler <->


To
'Lyle Beidler' <->
<->
cc

Subject
[proecus] - RE: another jlink question -OpenFile opens multiple windows






Sorry – I inadvertently sent that the first time.

Can anyone tell me why this section opens 2 windows?

String partName =
modelFileName.substring(0,modelFileName.length()-4);
partName = partName + ".prt";

ModelType modelParttype =
ModelType.MDL_PART;
ModelDescriptor descriptor;

descriptor =
pfcModel.ModelDescriptor_Create(modelParttype, partName,null);
com.ptc.pfc.pfcWindow.Window
partWindow = session.OpenFile(descriptor);
partWindow.Activate();
partWindow.Repaint();


--

Lyle Beidler
MGS Inc
178 Muddy Creek Church Rd
Denver PA 17517
717-336-7528
Fax 717-336-0514
-
Top Tags