.NET

Reply
Distinguished Contributor
JanetDavidson
Posts: 139
Registered: ‎08-23-2011
Message 11 of 15 (181 Views)

Re: Responding to the Properties Palette

03-16-2012 07:53 PM in reply to: jeff

Hello Jeff. I am not quite following . I am not a Pro

I will  rephrase the problem. Not a good writer but I do my best.

1- Matt and I don't want to have a constant object.modified event in our applicaton, because of it's overload.

2- Changing a block attribute or a layer , off the properties window doesn't fire any command. If it did we could've catch the start command event and now we could start the object.modiied event.and find what object's being modifed.

 

Now, how we could catch the entities which have been modified  off the properties window?

Now could you please re-explain what is your suggestion?

Contributor
Mathew.webber
Posts: 19
Registered: ‎07-26-2010
Message 12 of 15 (161 Views)

Re: Responding to the Properties Palette

03-19-2012 02:38 AM in reply to: JanetDavidson

Janet/Jeff,

 

My solution is to add three handlers to each entity (Modified, Unmodified and Erased). In each of these I record what has happened by storing the entities ObjectId and an Enum describing what happened. This then gies into a collection of object which i then process later. As you have probably seen the AutoCAD will throw a conbination of those changes at which point I only remember the most important of the events for each entity.

 

At the top of each handler I already do as Jeff suggests and check the CommandName to see if changes need to be process. I.e. 'Save' commands will cause MText objects to refresh however no changes need to be tracked for my data.

 

I then process the collection in the 'EnteringQuiescentstate' handler, which will only lead to updates if some of my object had added to the collection. So far this is working out well for me, obviously there are redudant calls to the handler, but they have minimum overheads. That said there were also redudant calls when I was using CommandEnded as not all commands would affect my entities. i.e. adjusting an entity elsewhere.

 

Ideally CommandEnded (or another event such as 'UpdatesFinished') would be thrown when changes to entities had finished either via the drawing or Properties Palette. This is unlikely to happen anytime soon though :smileysad:

 

Does that help at all Janet?

 

Mat

 

Distinguished Contributor
JanetDavidson
Posts: 139
Registered: ‎08-23-2011
Message 13 of 15 (138 Views)

Re: Responding to the Properties Palette

03-21-2012 04:28 AM in reply to: Mathew.webber

Thanks Mat. I started to write what you are suggesting. I hope it works for me.

Regards,

Janet.

 

Valued Mentor
jeff
Posts: 334
Registered: ‎05-12-2009
Message 14 of 15 (116 Views)

Re: Responding to the Properties Palette

03-26-2012 08:09 AM in reply to: JanetDavidson

Can't really add to aything already mentioned but you could look at Stephen Preston's Network example for using overrules.

 

 

 

You can also find your answers @ TheSwamp
Distinguished Contributor
JanetDavidson
Posts: 139
Registered: ‎08-23-2011
Message 15 of 15 (86 Views)

Re: Responding to the Properties Palette

05-04-2012 07:00 AM in reply to: Mathew.webber

Hi Matt,

I found in ObjectArx there is an event  handler named "ModelessOperationWillStart" in Editor objct. This triggers if   Proreties window is being editted  on or no . and if we can check for OPM change properties, it would be good.

But unfortunately this is not available in API. or it is and I don't know how to implement it. in objectarx its being called OPM  ( Guess it stands for Object Properties modelss or something )

 

check here:

http://forums.autodesk.com/t5/forums/forumtopicprintpage/board-id/34/message-id/22395/print-single-m...

 

 

I am not ADN memeber. I already shoot this question here. But maybe you can ask ADN and  those Big guys and they can clarify this for us.

Let me know .

Janet.

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post