Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I am creating a plugin for a project that will allow users to display polylines etc as 3d solids using the overrule by apply xdata with the radius.
Works fine on the most part, but on the occasion that a swept solid can't create, I want the overrule to be disabled (I have already got the xdata being removed working).
public override bool WorldDraw(Drawable d, WorldDraw wd) { double radius = 0.0; if (d is DBObject) radius = GetPipeRadius((DBObject)d); if (radius > 0.0) { Polyline pline = d as Polyline; if (pline != null) { Solid3D sol = GeometryServices.CreatePipe((Entity)pline, radius); if (!sol.Created) // this is a property in my inherited solid3d class return false; base.WorldDraw(pline, wd); short c = wd.SubEntityTraits.Color; wd.SubEntityTraits.Color = GeometryServices.GetColour(pline.Layer); wd.SubEntityTraits.LineWeight = LineWeight.ByLineWeightDefault; sol.WorldDraw(wd); sol.Dispose(); wd.SubEntityTraits.Color = c; return true; } } return base.WorldDraw(d, wd); }
Currently the code executes, but after (if the solid doesn't create), I am not able to select the polyline. No grips are shown, wont show in properties, can't list it. After I do an audit, it is back to normal.
Can anyone see how I can do this? happy to provide more code if needed.
Cheers,
Brent
Solved! Go to Solution.