« Unload Family Type | Main | Creating a Curved Beam »

June 12, 2009

Comments

Jeremy,

Another great post. Do you think I could implement something similar for the duplicate instances notification? I would like to automatically remove the second instance, which requires you to click on a + to expand the list of duplicate instances and then check the one you want to delete and then click on delete. I am going to look into this too but wondered if you had ran across anything like this.

Joel

Dear Joel,

I'm very glad you like it, so do it. One of my favourites posts lately :-)

I expect you can use it for the situation you describe as well. I developed the code above for exploration purposes while searching for the solution, so if you just remove the lines dealing with the isConfirm variable, or set it to a constant false value, the whole thing is reduced to a dialogue event logging system.

You could probably also use the Revit SDK EventsMonitor sample to monitor the dialogue events. Oh no, I just checked, and it does not handle the DialogBoxShowing event. Well, then you are stuck with my contribution above.

If you like, please keep your solution minimal and completely generic when you implement it and send it to me afterwards, and I'll post it as well :-)

Cheers, Jeremy.

Hi Jeremy, great article! Have you ever attempted to hook onto when the 'Save As' dialog opens?

Thanks,
Dan

Dear Dan,

Thank you for your appreciation, I am very glad that you like it!

Not personally. The topic of raising an event on Save As is mentioned briefly in

http://thebuildingcoder.typepad.com/blog/2009/03/more-questions.html

I also remember a developer support case concerning this issue. Looking a bit closer, I discover that the case was raised by Mr. Dan Tartaglia :-)

So you know all about it. I see there that we found no support for your needs in the Revit API, and I don't know how to achieve it using the Windows API, though I do believe it is possible, and probably not very hard if you just know the optimal approach. Sorry.

Cheers, Jeremy.

I didn't know if you had any updated info on the issue. I'm sure this is something a number of users would love to do.

Cheers,
Dan

Dear Dan,

Well, as said, I do believe it is possible to hook into the Save As dialogue using the Windows API.

What exactly was it that you wanted again?

By the way, have you had a close look at

http://thebuildingcoder.typepad.com/blog/2009/10/dismiss-dialogue-using-windows-api.html

That may already provide all you need to solve this.

Cheers, Jeremy.

Hi Jeremy,

I want to hook onto the Save As dialog, cancel it, get the revit Document object then open my own dialog. I'll see if I can do the Windows part with the info in the above link.

Hi Jeremy, I'm not sure how to capture the child dialog of Revit with the JtClicker utility.

Dear Dan,

Well, capturing the dialogue should not be a big issue, it is simply identified by its title or whatever widgets it contains. You are pretty free to identify it in any way that you see fit.

I still don't know whether that will be much use to you, though, you want to do more than just click a button.

I suggest you ask a Windows API expert. This has nothing to do with the Revit API as such.

Cheers, Jeremy.

Gee thanks.

I apoligize for my sarcastic response. It's just very frustrating trying to accomplish this task using the API. I appreciate all your help.

Thanks,
Dan

Dear Dan,

:-) I love a bit of sarcasm now and then.

Sorry that I can't think of anything more helpful.

Cheers, Jeremy.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource