Thanks for the information.
I've struggled a bit when mixing elements that used draw and other elements that were lists of graphic elements in a list.
I'm using it to switch elements/layers in a graphics on and off.
Here's part of the code that deals with the plotting.
geometryList := [op(geometryList), op(segmentlist)];
beams := convert(beams, list);
plotitems := [op(beams)];
if GetProperty("CheckBox_GraphicsShowAnnotations", value) = "true" then
plotitems := [op(plotitems), op(annotations)]
if GetProperty("CheckBox_GraphicsShowDistances", value) = "true" then
plotitems := [op(plotitems), op(distances)]
if GetProperty("CheckBox_GraphicsShowForces", value) = "true" then
plotitems := [op(plotitems), op(displayForceVectors)]
SetProperty("Plot_result", value, display(geometry:-draw(geometryList), plotitems));
As you see, plotitems is a list of graphic elements that can be expanded. What I haven't managed to do is putting the geometryList elements, where elements that need to be called by the draw command, to the list as well.
It's no big deal, as I could go around the problem in that case.