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

How to set GsMarker

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
khunstad
899 Views, 3 Replies

How to set GsMarker

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...

3 REPLIES 3
Message 2 of 4
khunstad
in reply to: khunstad

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!

 

Message 3 of 4
owenwengerd
in reply to: khunstad

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
Message 4 of 4
khunstad
in reply to: owenwengerd

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.

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

Post to forums  

Autodesk Design & Make Report

”Boost