ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Polyline Grip Overrule

4 REPLIES 4
Reply
Message 1 of 5
RasmusB
612 Views, 4 Replies

Polyline Grip Overrule

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)

---
2B or not 2B? That is the question! The answer is FF.
4 REPLIES 4
Message 2 of 5
fenton.webb
in reply to: RasmusB

Can we see your code?




Fenton Webb
AutoCAD Engineering
Autodesk

Message 3 of 5
RasmusB
in reply to: fenton.webb

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.

---
2B or not 2B? That is the question! The answer is FF.
Message 4 of 5
fenton.webb
in reply to: RasmusB

Thanks for your reply. It's impossible to imagine what is going wrong, we need to see a reproducible sample.




Fenton Webb
AutoCAD Engineering
Autodesk

Message 5 of 5
RasmusB
in reply to: fenton.webb

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.

---
2B or not 2B? That is the question! The answer is FF.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost