I am considering adding a Polyline grip overrule to my ObjectARX project, and for the purpose of testing, I am currently just looping through a Polyline's grips and adding my own grip data for each of them. For a simple linear Polyline with two vertices only, I am seeing three grips being fetched in my debugger (as expected), and thus I am passing three of my own grip objects on to AutoCAD - however, only two grips (start and end) are drawn in the GUI. Where has the mid-segment grip gone? (I am passing the world draw function from the Polyline's grip data on to my own grip data)
I observe the following:
1) If I loop through the grips of a Polyline, create an instance of AcDbGripData for each of them, set the AcDbGripData::setWorldDraw and AcDbGripData::setViewportDraw from the Polyline grip, and add the AcDbGripData-instances to the grips array of the overrule, then only the grips of the polyline's vertices are drawn.
2) If I loop through the grips of a Polyline, create an instance of AcDbGripData for each of them and input nullptr to setWorldDraw and setViewportDraw, then also the polyline's midpoint grips are displayed - but they are drawn as blue squares (as the "vertex" grips).
3) If I just pass on the polyline's grips to the "grips" array parameter of the overrule class , i.e. passing the "grips" array into the AcDbPolyline::getGripPoints, then all grips (vertex and segment mid-point) are displayed as expected.
So I cannot "wrap" all the grips of a polyline? The reason I want to do this, is because I want to give a special behaviour to a block containing several polylines, but at the same time offer the normal behaviour of a polyline's grip.
Thanks for your reply. It's impossible to imagine what is going wrong, we need to see a reproducible sample.
I will try to make one if/when I get the time...because of the "special" behaviour I want to give to the block, I need to implement the polyline grips myself anyhow, so the issues I have described does not concern me right now. Thanks for your interest.