Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
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.
Solved! Go to Solution.
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
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.