I've tried to base my work on the example here http://www.freecadweb.org/wiki/index.ph ... _workbench
This is the code I have.
Code: Select all
class CadQuerySaveScript:
"""CadQuery's command to save a script file"""
def GetResources(self):
return {"MenuText": "Save Script",
"Accel": "Alt+S",
"ToolTip": "Saves the CadQuery script to disk",
"Pixmap": """
/* XPM */
static const char *test_icon[]={
"16 16 2 1",
"a c #000000",
". c None",
"................",
"................",
"..############..",
"..############..",
"..############..",
"......####......",
"......####......",
"......####......",
"......####......",
"......####......",
"......####......",
"......####......",
"......####......",
"......####......",
"................",
"................"};
"""}
Code: Select all
Cannot find icon:
/* XPM */
static const char *test_icon[]={
"16 16 2 1",
"a c #000000",
". c None",
"................",
"................",
"..############..",
"..############..",
"..############..",
"......####......",
"......####......",
"......####......",
"......####......",
"......####......",
"......####......",
"......####......",
"......####......",
"......####......",
"................",
"................"};