Have you tried calling base.WorldDraw() before you draw your
custom graphics?
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6231166@discussion.autodesk.com...
Hi all,
Just learning a bit about the new Overrule API in 2010 and I have a question
about controlling the draworder in which objects are displayed. I'm
basically adding a hatch to a polyline (really a curve), with the WorldDraw
code below, but the hatch is obscuring the polyline. Can someone offer some
guidance on changing the display order so I can see the polyline?
Thanks in advance for your help,
-Danny
{code}
Public Overloads Overrides Function WorldDraw(ByVal d As Drawable, ByVal
wd As WorldDraw) As Boolean
If Not TypeOf d Is Curve Then
Return MyBase.WorldDraw(d, wd)
End If
Try
Dim c As Curve = d
Dim h As New Hatch()
Dim oic As New ObjectIdCollection
oic.Add(c.ObjectId)
h.SetDatabaseDefaults()
h.AppendLoop(HatchLoopTypes.Default, oic)
h.SetHatchPattern(HatchPatternType.PreDefined, "SOLID")
h.Color =
Autodesk.AutoCAD.Colors.Color.FromColorIndex(ColorMethod.ByAci, 😎
h.WorldDraw(wd)
h.Dispose()
Catch ex As Exception
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(ex.Message)
End Try
Return MyBase.WorldDraw(d, wd)
End Function
{code}