« Real-World Concrete Corner Coordinates | Main | Worksharing Central Filename »

June 21, 2012

Comments

Hi Jeremy, hi Victor,

after reading the command IDs, I assume they can be used with UI Automation.
For example,
ID_ANNOTATIONS_DIMENSION_ALIGNED
can be found in the status bar text in this screen shot:
http://thebuildingcoder.typepad.com/.a/6a00e553e1689788330147e270f039970b-popup

So after *knowing* all command IDs, we could also *invoke* all commands:
http://thebuildingcoder.typepad.com/blog/2011/01/ribbon-spying-and-ui-automation.html

Cheers,
Rudi

Hi Jeremy,

I really doubt if overwriting existing functions should be done at all.

There are cases in which a plugin can affect the behaviour of the whole application, e.g. when using RegisterFailuresProcessor().
In the worst case, it may be that one of your installed plugins suppresses all warnings and errors, avoiding you from performing the needed error solution even manually.

When overwriting existing functions, it may be that the user doesn't even know that he uses a replacement function, depending on the documentation you shipped with your plugin.


Cheers,
Rudolf

You can also get a listing of all the Command_Ids from the keyboardshortcuts.xml file ")

Hi, Rudolf.
I haven't seen this post before. Thanks for link. I think that information should useful for me.
Regards, Victor.

Hello, Phillip.
Where can I get the keyboardshortcuts.xml file? I cann't find it anywhere.

Hi Victor.

First you need to activate the keyboards shortcuts through the Revit UI by going to ribbon -> View -> User Interface -> keyboard shortcuts.

Add a shortcut and that will create the shortcuts file. I hope that helps.

Dear Rudi,

Yes, very reasonable doubts indeed. Please take heed.

Cheers, Jeremy.

Hi Jeremy,

Is invoking a command in this manner a recommended approach?

Thanks,
Dan

Dear Dan,

There is currently no recommended approach to invoke a command. The Revit API does not support it at all. All you can do at the moment is replace a built-in Revit command with your own implementation. Everything else is unsupported and not recommended.

Cheers, Jeremy.

Hi..Jeremy..

I am creating commandBinding() for revit "CreateSimilar" functionality. But I am not able to get orginal behaviour of "Create Similar" after removing Executed event from the document. How can i acheive this?

Thanks

You realize that the Excel sheet also exposes all internal Debugging commands? That is actually very handy.

Dear Martin,

Thank you for pointing this out. Nope, I did not realise that.

Why do you find them handy, please? What do you use them for?

Thank you!

Cheers, Jeremy.

Dear Sangsen,

Have you tried using UIApplication.RemoveAddInCommandBinding?

Cheers, Jeremy.

On a semi-related note, I'm trying to identify the commands associated with Detail Lines for creating custom keyboard shortcuts. Modifying the commands for Contextual Tabs>Draw works for Filled Regions, Floors, etc. but does not seem to work for Detail Lines. Any idea where else to look?

Is there any way to get the command id associated with a particular button?

Dear Mark,

I would have expected them to be in there.

If not, have you looked in the journal file?

Cheers, Jeremy.

Doesn't seem to have "Edit Family" either which I really need.

Dear Michael,

I guess they thought that you can do more with the EditFamily API method, and using OpenAndActivateDocument to navigate.

Or there were other internal reasons for not exposing such a complicated command :-)

Cheers, Jeremy.

What if you were looking to have a warning dialog and then proceed with the originally requested command.

So you could use the commandBinding then run a eventhandler to show the dialog, could you then have the original command run after the user clicks OK on the warning box?

or is that a different process than commandbinding? Is there a process to catch when standard Revit commands are run and do things alongside the command?

found it:

AddInCommandBinding.BeforeExecuted Event

Cheeky question, but is there an updated list of internal commands for 2015? I am not sure what assembly reference I need for the InternalCommandDef so I haven't managed to get it working to try to get the data myself.

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