Hello Andrew,
you use
fragment2 index,flag.
The flag has two possible values:
1: All lines, fills etc. get the settings your script has made until the fragment2 statement occures. This means: If you write
pen 7 : fragment2 5,1
All elements on layer 5 are drawn with pen 7.
0: All lines and fills will be displayed like you have pasted them into the 2D-Symbol window.
But the attributes (line weight/fill type) are not stored in the object. Only the reference number of the fill or the pen will be 'remembered'. If you change to another plan, where the choosen fill has another look, or the pen 7 has another weight/colour, the object changes its 'style'.
You have two possibilities:
First: Create/Modify your object out if the plan you want to place it in. Attention. This will change all occurances of this objects in all projects THIS object is used.
Second: Add some fill/pen-Parameters to your object and use the fragment2 with flag 1. (If you need now more than 16 layers, try to work with macro-objects. I have not tested it, but it should work.)