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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Weblink - How to get Activate Model in Assembly

Shu-FanWang
1-Newbie

Weblink - How to get Activate Model in Assembly

Hi, all


I have trying to assemble components into subassembly which had been activated,


but just can't find any way to get the Activate subassembly model.


model.currentmodel only can get root assembly.


"


Is it possible to dothat in weblink?


Any advisewill be fully appreciate


Thanks


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.
4 REPLIES 4

No ? you cannot do this with Weblink.

It is not possible to set the active model and you are not able to find out
if the active model differs from the current model being displayed in the
current window.



Andreas


Thanks for the reply~ Andreas



Itry to use pfcselect instead, let users to point out the target subassembly.


It works well as below;


-----------------


var selopts = new ActiveXObject("pfc.pfcSelectionOptions").Create("prt_or_asm");
var sels = session.Select(selopts, null);
var sel = sels.Item(0);
var model = sel.SelModel;


-----------------


Pro/E will pop up a Select message window while session.Select(); (as attachment)


Is that possible to change the text "Select -2147483648 items" at will?


Thanks


Shu-Fan

bfrandsen
6-Contributor
(To:Shu-FanWang)

There is a MaxNumSels property on the pfcSelectionOptions class. See the
APIWizard.
/Bjarne



Shu-Fan Wang <->
23-03-2011 13:48
Please respond to
Shu-Fan Wang <->


To
<->
cc

Subject
[proecus] - RE: AW: Weblink - How to get Activate Model in Assembly






Thanks for the reply~ Andreas

I try to use pfcselect instead, let users to point out the target
subassembly.
It works well as below;

Thanks for the reply,


It works as below,


-----------------


var selopts = new ActiveXObject("pfc.pfcSelectionOptions").Create("prt_or_asm");
var sels = session.Select(selopts, null);


sels.MaxNumSels = 1;
var sel = sels.Item(0);
var model = sel.SelModel;


-----------------


The text become "Select 1 items".



~Shu-Fan

Top Tags