Could any of ArcObjects guru tell me, what are these green lines on my Page Layout and what to do, or not to do, so they do not appear? See image attached.
I do used ArcObjects from Python. My script is converting data frame grids and graticules into graphics. As result I receive Group Element from which I need to extract single elements (text, lines etc.) in order to play with them. However, after this operation (which is carried out for 3 separate grids) I receive those mysterious green lines, which are not part of GraphicContainer. Actually, green lines appear only after conversion and extraction from one- graticule (WGS).
There is some guidance here about how to get rid of them, which works (cut and paste or delete and undelete all page elements). However, I would still like to avoid them in the first place. Also, after some configurations of cutting and pasting I figured that green lines do vanish when those 3 image elements (lower right corner) are deleted and restored.
Code suspected to be responsible for this:
pGCL.Reset() #reset graphics containere
pElem = pGCL.Next()
while pElem:
pEP3 = CType(pElem, esriCarto.IElementProperties3)
if pEP3.Name == '' and pEP3.Type == 'Group':
pGE = CType(pElem, esriCarto.IGroupElement3)
pGE_no = pGE.ElementCount
for i in range(pGE_no):
if pGE.ElementCount > 0:
pGEe = pGE.Element[0]
pGCL.MoveElementFromGroup(pGE, pGEe, 0)
else: break
pElem = pGCL.Next()
I know there is some discussion going on, whether GIS.SE is appropriate place for such technical, software specific questions. I apologize for this, however, I did not found satisfactory answer anywhere else.