.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
DescriptionReturns whether tool item or menu command is in current workspace.
VAR PaletteName :STRING) : BOOLEAN;
def vs.HasPlugin(itemUniversalName): return (BOOLEAN, PaletteName)
itemUniversalName STRING Universal name of the plug-in PaletteName STRING If plug-in is a tool, and is found in the workspace, the name of the palette in which it is contained will be returned in this parameter
Return ValueReturns true if the plug-in is found in the workspace; false otherwise.
RemarksIn 2008, this only seems to work on plug-in objects and tools in the workspace.
The plug-ins have to plug-ins (VectorScript or SDK features, not built-in objects or tools). In other words, there has to be a file in the Plug-Ins folder associated with the feature. And it doesn't work on plug-in menu commands. In 12.5.3, it would work on menu commands, and the "paletteName" argument would be set to the menu group containing the item.
PROCEDURE Example; VAR itemUniversalName :STRING; paletteName :STRING; result :BOOLEAN; BEGIN itemUniversalName := 'Spiral'; result := HasPlugin(itemUniversalName, paletteName); AlrtDialog(Concat('result: ', result, Chr(13), 'paletteName: ', paletteName)); END; RUN(Example);