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

AcEdInputPointMonitor::monitorInputPoint final

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Anonymous
1176 Views, 6 Replies

AcEdInputPointMonitor::monitorInputPoint final

Hi, 

 

I draw additional info on my custom object when the user selects the object, such as the object's local user axis system as well as its origin point. Previously I did this by over-riding AcEdInputPointMonitor::monitorInputPoint in a special class in the "UI" part of my code (arx part) where I could get a grip on the AcGiViewportDraw* drawContext and so add geometry, such as lines and a circle, to the viewport.

 

In "acedinpt.h" comments in the new SDK, it notes that this function now is final and states that it will be removed in a future releases. 

 

Can you please let me know what the new/alternative method would be to accomplish this functionality.

 

Regards,

JP 

6 REPLIES 6
Message 2 of 7
Alexander.Rivilis
in reply to: Anonymous

You have to use other overloaded method:

virtual Acad::ErrorStatus monitorInputPoint(const AcEdInputPoint& /*input*/,
AcEdInputPointMonitorResult& /*output*/);

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 3 of 7
Anonymous
in reply to: Alexander.Rivilis

Hi Alexander,

 

Thanks for the reply. I saw this function and tried to implement it. However, I cannot seem to access AcGiViewportDraw* drawContext (which i need to draw in the model space around my custom object). I have seen in the header file that *AcEdInputPointMonitorResult do implement a friend class "friend class AcEdImpInputPointManager" and this pointer do contain "ACAD_PORT AcGiViewportDraw* drawContext() const;". 

 

Can you please assist in how to return "AcEdInputPointMonitorResult& /*output*/" whilst utilising the drawContext in AcEdImpInputPointManager;

 

Regards,

JP

Message 4 of 7
Alexander.Rivilis
in reply to: Anonymous

Simple sample drawing circle around current point:

//-----------------------------------------------------------------------------
Acad::ErrorStatus PointMonitor::monitorInputPoint(const AcEdInputPoint& inpt /*input*/,
  AcEdInputPointMonitorResult& outpt /*output*/)
{
  if (inpt.pointComputed()) {
     AcGePoint3d pCenter = inpt.computedPoint();
     inpt.drawContext()->geometry().circle(pCenter, 10.0, inpt.drawContext()->viewport().viewDir());
  }

  return Acad::eOk;
}

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 5 of 7
Anonymous
in reply to: Alexander.Rivilis

In the old monitorinputpoint function(before AC2021) the apertureEntities argument exists. But the new function it does not exists in AcEdInputPoint. How to get apertureEntities in monitorinputpoint function.

Message 6 of 7
Alexander.Rivilis
in reply to: Anonymous

Try to check pickedEntities() method of AcEdInputPoint class.

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 7 of 7
Anonymous
in reply to: Alexander.Rivilis

Thanks a lot for the information. I will try.

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

Post to forums  

Forma Design Contest


AutoCAD Beta