Skip to main content
1-Visitor
December 7, 2010
Question

another jlink question -OpenFile opens multiple windows

  • December 7, 2010
  • 2 replies
  • 822 views
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

1-Visitor
December 7, 2010
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>
10-Marble
December 13, 2010
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
-