How to set GsMarker

How to set GsMarker

Anonymous
Not applicable
1,168 Views
3 Replies
Message 1 of 4

How to set GsMarker

Anonymous
Not applicable

Hi!

 

I don't quite get the GsMarker thing. I have a custom object. In it's subWorldDraw I have:

 

wd->subEntityTraits().setSelectionMarker(1000185);

wd->geometry().circle(pt1, r1, normal());

 

which I thought was how to set the GsMarker for this circle subentity of my object.

 

Then somewhere else I try finding this subentity by:

 

AcGePoint3d pickpnt;
int numPaths;
AcDbFullSubentPath* subentPaths;
AcGeMatrix3d xform;
Acad::ErrorStatus es;
es = getSubentPathsAtGsMarker(AcDb::kVertexSubentType, 1000185, pickpnt, xform, numPaths, subentPaths);

 

but this always returns eInvalidInput.

 

I can't really find any good documentation or example of how to do this anywhere...

0 Likes
Accepted solutions (1)
1,169 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

I put this into an monitorInputPoint:

 

for (int i = 0; i < gsSelectionMark.length(); ++i)
{
const Adesk::GsMarker thisMarker = gsSelectionMark[i];
REL_DBGOUT(_T("\nSelection mark: %d"), (int) thisMarker);
}

 

which actually returned my GsMarkers/Indices. So the setSelectionMarker works, but if someon can explain getSubentPathsAtGsMarker in more detail, I would appreciate it!

 

0 Likes
Message 3 of 4

owenwengerd
Advisor
Advisor
Accepted solution

I think you should start by implementing the subGetGsMarkersAtSubentPath() and subGetSubentPathsAtGsMarker() functions. The documentation implies that these functions are used to map subentities to gs markers and vice versa for highlighting (and probably other things as well). Based on your observations, it sounds like you need to define that mapping.

--
Owen Wengerd
ManuSoft
0 Likes
Message 4 of 4

Anonymous
Not applicable

I think you might be right that I need to implement those functions, but I don't quite see _why_ I should have to do this. Luckily I managed without for the current problem, see another thread from me. So I accepted your solution because I think you are right.

0 Likes