Skip to main content
10-Marble
December 22, 2015
Solved

using web/link to highlight specific item ?

  • December 22, 2015
  • 1 reply
  • 2042 views

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.
Best answer by AndreasHellmann

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

1 reply

1-Visitor
December 27, 2015

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

10-Marble
December 30, 2015

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