ObjectARX

ObjectARX

Reply
Contributor
renencon
Posts: 25
Registered: ‎02-08-2012
Message 11 of 18 (149 Views)

Re: AcDbEvalGraph, AcDbEvalExpr related question

11-12-2012 05:49 AM in reply to: renencon

Hello Balaji,

 

One more thing

 

As a general rule you never modify a notifier from within one of its reactor functions.

 

That is why you store the _associatedId within the persistent reactor object.

 

Which means I need to move the association links from my custom objects to their appropriate prersistent reactor objects which in turn will be stored within the extension dictionary of my custom objects(the notifiers). That way I will be able to update their values (linked objects) form within the reactor modified function.

 

Is that correct?

 

Thanks again

Anastassios.

 

ADN Support Specialist
Balaji_Ram
Posts: 723
Registered: ‎03-21-2011
Message 12 of 18 (136 Views)

Re: AcDbEvalGraph, AcDbEvalExpr related question

11-14-2012 03:31 AM in reply to: renencon

Hi Anastassios,

 

Sorry for the delay. I was out-of-office for a few days.

 

Regarding your query related to spatial index :

 

I dont see the need to use spatial index with persistent reactors. A change in the object property will automatically ensure that the associated persistent reactors gets a call.

 

Regarding your other query on using a reactor function to modify a notifier :

 

You are right, in general reactor callbacks should not be used to modify the database entities, but I havent come across any issues while using persistent reactor callbacks. Please let me know if you have any specific issue while using it.

 



Balaji
Developer Technical Services
Autodesk Developer Network

Contributor
renencon
Posts: 25
Registered: ‎02-08-2012
Message 13 of 18 (121 Views)

Re: AcDbEvalGraph, AcDbEvalExpr related question

11-17-2012 12:30 PM in reply to: Balaji_Ram

Hello Balaji,

 

I wanted to use spatial index so that I will find quickly from the database the objects that are on the same point after a grip edit operation within the GripOpStatFunc when the GripStatus is kGripEnd and then I could update the links between the involved entities. However, I abandoned that approach and I try now again to use setInputPointFunc, but came across the same problem.

When I hover over other entities, pickedEntities parameter will indicate to me whether the type of entity that I am looking for is under the cursor. Then I want to display custom graphics next to the cursor (like Civil3d's Pipe Network, when you grip edit a pipe and you move it over another pipe or structure from the same network then a special glyph is drawn to indicate that the network connections will be updated. This is the process that I would like to mimic).

 

Now, the question is how do I draw the special graphics from within GripInputPointPtr function. When you use the equivalent AcEdInputPointMonitor::monitorInputPoint  you get a AcGiViewportDraw* drawContext parameter which could be used to draw the special glyph but with GripInputPointPtr function you only get 

viewContext const AcGiViewport& and viewportID const AcDbObjectId& parameters how these could be used to draw custom glyph graphics while I am dragging the grip?

 

Maybe, I am wrong with this approach and need to use something else as well.

 

Thanks again

Regards

Anastassios

 

 

Contributor
renencon
Posts: 25
Registered: ‎02-08-2012
Message 14 of 18 (113 Views)

Re: AcDbEvalGraph, AcDbEvalExpr related question

11-18-2012 01:06 PM in reply to: renencon

Hello Balaji

 

As far as the GripInputPointPtr question is concerned in my previous post I think I got it I started using setDrawAtDragImageGripPoint to true and modified the worlddraw method for the grip. So I hope I will get the result that I am looking for.

 

Is there another approach.

What about my comments on spatial index and picked entities on my previous post.

 

Thanks again

Regards

Anastassios

Contributor
renencon
Posts: 25
Registered: ‎02-08-2012
Message 15 of 18 (110 Views)

Re: AcDbEvalGraph, AcDbEvalExpr related question

11-18-2012 02:01 PM in reply to: renencon

One more thing is there a way to get the environment grip colors that are set at the AutoCAD options dialog from within a grip's worlddraw function.

 

Thanks again

Anastassios

 

Contributor
renencon
Posts: 25
Registered: ‎02-08-2012
Message 16 of 18 (102 Views)

Re: AcDbEvalGraph, AcDbEvalExpr related question

11-19-2012 12:01 AM in reply to: renencon

More specifically if you do not use subEntityTraits().setColor then graphics are drawn with grip colors except GRIPCONTOUR so when you draw a filled square grip then the outline of the square is drawn in the default GRIPCOLOR not GRIPCONTOUR color as in standard AutoCAD grips.

 

Thanks,

Anastassios

ADN Support Specialist
Balaji_Ram
Posts: 723
Registered: ‎03-21-2011
Message 17 of 18 (98 Views)

Re: AcDbEvalGraph, AcDbEvalExpr related question

11-19-2012 12:20 AM in reply to: renencon

Hi Anastassios,

 

I was busy with other activities.

 

If you can create different posts, each one with a specific question, I am sure you will get answers more quickly.

Because this post is marked as answered, experts in this discussion group may not look into your latest query.

 

It will also help me understand your question better and also help others who will be searching for related info in this forum.

 

 

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Contributor
renencon
Posts: 25
Registered: ‎02-08-2012
Message 18 of 18 (96 Views)

Re: AcDbEvalGraph, AcDbEvalExpr related question

11-19-2012 12:25 AM in reply to: Balaji_Ram
Fair enough, I do apologise, I will repost the queries under a different topic. Thanks Anastassios
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.