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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

using web/link to highlight specific item ?

Andy.Hsieh
7-Bedrock

using web/link to highlight specific item ?

I found a function in User Guide named pfcScript.pwlItemHighlight(), and the API Wizard showed the information about this function.

pwlItemHighlight (string SelString)

Highlights the specified item

Did anyone know the exact format of  input param 'SelString' ?

I had tried pfcModel.FullName, pfcModel.FileName and didn't work.


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.
1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

you first have to define a selection in Weblink before you can highlight anything:

To build a selection of an item and/or a component in an assembly:

var MyItemSelection = pfcCreate("MpfcSelect").CreateModelItemSelection (MyItem, ItemComponentPath); // ItemComponentPath can be null in part mode

var MyCompSelection = pfcCreate ("MpfcSelect").CreateComponentSelection (MyComponentPath);

To highlight the selection in letter color/yellow:

MyItemSelection.HighLight (pfcCreate ("pfcStdColor").COLOR_LETTER);

To Unhighlight again:

MyItemSelection.Unhighlight();

Andreas Hellmann

View solution in original post

2 REPLIES 2

Hello,

you first have to define a selection in Weblink before you can highlight anything:

To build a selection of an item and/or a component in an assembly:

var MyItemSelection = pfcCreate("MpfcSelect").CreateModelItemSelection (MyItem, ItemComponentPath); // ItemComponentPath can be null in part mode

var MyCompSelection = pfcCreate ("MpfcSelect").CreateComponentSelection (MyComponentPath);

To highlight the selection in letter color/yellow:

MyItemSelection.HighLight (pfcCreate ("pfcStdColor").COLOR_LETTER);

To Unhighlight again:

MyItemSelection.Unhighlight();

Andreas Hellmann

Thanks hellmann, you really do me a favor ! Now I can highlight any ModelItem I want.

Top Tags