How to highlight custom entity edge during DIMANG command?

How to highlight custom entity edge during DIMANG command?

maisoui
Advocate Advocate
1,067 Views
4 Replies
Message 1 of 5

How to highlight custom entity edge during DIMANG command?

maisoui
Advocate
Advocate

Hi,

 

I have a custom entity which looks like a curve. To be able to interact with command DIMANG, I implement the following methods: subGetSubentPathsAtGsMarker and subSubentPtr. Everything works, I can create an angular dimension on arc segment, but during the command the edge (defined by GsMarker) is not highlighted. I want to reproduce the same behaviour as below (polyline):

 

highlighted_edge.png

 

I tried to implement the method subGetGsMarkersAtSubentPath, but nothing changes, my whole entity is highlighted. However if I manually highlight the edge (using objectARX - pEntity->highlight(subId)), it perfectly works.

 

Any suggestions are welcomed.

Regards,

--
Jonathan
0 Likes
1,068 Views
4 Replies
Replies (4)
Message 2 of 5

moogalm
Autodesk Support
Autodesk Support

Hi,

 

Hope your customentity is derving from AcDbPolyline.

 

These are things you need to do

1. Implement

AcEdSSGetFilter3:: ssgetRolloverFilter

2. Implement PointMonitor

 

You need to manipulate subentitypaths, such that hovered subentity is included and rest is excluded from the path arrays.

 

To get hovered sub-entity you may have to implement pointmonitor, from which you will rawinput, check closest curve for this rawinput of your customentity, append the subentitypath of this closest curve to the input argument "AcDbFullSubentPathArray &highlightPaths" of ssgetRolloverFilter.

 

 

If you have your customentity working code, please send it to me, I will try to implement for you.

 

0 Likes
Message 3 of 5

maisoui
Advocate
Advocate

Hi,

 

Thank you for your reply. I guessed the solution was tricky but simple.

My entity isn't deriving from AcDbPolyline, because it is complex and, from experience, every time I derive from AutoCAD entities I encounter problems.

I have to think to see if such a solution worth it.

 

Regards,

--
Jonathan
0 Likes
Message 4 of 5

moogalm
Autodesk Support
Autodesk Support

Ok !, do let me know and share the solution you thought about. 🙂

0 Likes
Message 5 of 5

xropro
Contributor
Contributor

Could you share this custom entity? I would also like to highlight some of the subentities within the custom entity, thank you!

0 Likes