Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

How do you remove the dotted line?

$
0
0
Is there a way to get rid of the dotted line? I'm trying to get a landscape layout but there's that leftover portrait dotted line.

I don't know what it's called. Apparently, it's not the MapFrame. See dotline.jpg below.

Dim doc As IDocument = New MxDocument

Dim pMxDocument As IMxDocument = doc
m_application = doc.Parent
m_application.Visible = True
m_appHWnd = m_application.hWnd

pMxDocument.ActiveView = pMxDocument.PageLayout
pMxDocument.PageLayout.Page.Orientation = 2

Dim GC As IGraphicsContainer = TryCast(pMxDocument.PageLayout, IGraphicsContainer)
Dim pElement As IElement = GC.FindFrame(pMxDocument.FocusMap)
Dim pMapFrame As IMapFrame = GC.FindFrame(pMxDocument.FocusMap)

pMapFrame.RemoveAllLocatorRectangles()

GC.DeleteElement(pMapFrame)
GC.DeleteAllElements()

Dim pEnvelope As IEnvelope = New Envelope
pEnvelope.PutCoords(1, 1, 10, 7.5)

pElement.Geometry = pEnvelope
GC.AddElement(pElement, 0)

pMxDocument.UpdateContents()
pMxDocument.ActiveView.Refresh()
Attached Thumbnails
Click image for larger version

Name:	dotline.JPG‎
Views:	N/A
Size:	19.7 KB
ID:	22468  

Viewing all articles
Browse latest Browse all 1374

Trending Articles