Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GUI design for Revit

17 REPLIES 17
Reply
Message 1 of 18
RyanCameron
4537 Views, 17 Replies

GUI design for Revit

Hello,

My friends and I are attempting to develop a secondary user-infterface for Revit.  If anyone is familiar with the right-click command in Fusion 360, or Inventor, a wheel (or circle) appears showing a pre-determined list of commands.  Not the same as "recent commands"  Now rather than going all the way up to the right tab location on the ribbon, I would be able to stay in place with my cursor and draw my next wall or insert my window.

Is it even possible to do this?  Since no event is fired when the menu appears already.

We have images, text files, etc... to explain further should this be able to get accomplished.  If someone knows of a way (or an alternative approach) let me know and we'll try to work out a deal.

 

Cheers!

RB Cameron, AIA, LEED AP, EDAC
Digital Practice Leader

17 REPLIES 17
Message 2 of 18

Hello,

 

I cannot think of a way to implement the "circle of commands" like you show but I wonder if a customized right-click menu with the list of context specific commands would work. Is that something you can work with? You mention more images and explanation. Can you please provide that? I will discuss with engineering and my colleagues.

 

Thanks

Gopinath

Message 3 of 18

Thanks.  I just wonder why nearly every major Autodesk product, (Fusion, 3dsMax, Inventor, Maya) has the right-click shortcuts "circle" except Revit.

Attached are some of the images I had on my phone.  My team has the other info and I can't get to that at the moment.  Hopefully this is enough to go off of.

RB Cameron, AIA, LEED AP, EDAC
Digital Practice Leader

Tags (3)
Message 4 of 18

Hello,

 

I am enquiring with the engineering team. I will get back to you as soon as I have some relevant information. Thanks for your patience.

 

Thanks

Gopinath

Message 5 of 18

Great! Thank you. Also, another alternative would be something like this: https://www.youtube.com/watch?v=pEIGzKf0GPE&feature=share&list=PLONdQc9bizsdU4c4Knua4kyjfh6apz61m&in...
RB Cameron, AIA, LEED AP, EDAC
Digital Practice Leader

Message 6 of 18
jeremytammik
in reply to: RyanCameron

Dear Ryan,

 

This sounds like a pretty big project, especially if you are forced to struggle to suppress built-in Revit functionality instead of being able to integrate with it and go with the flow.

 

Still, one thing that might be interesting to explore are the events provided by the UI Automation .NET library:

 

http://thebuildingcoder.typepad.com/blog/automation

 

They will at least tell you what is going on in the Revit ribbon.

 

I have been told that they are pretty slow, though.

 

I hope this helps.

 

I asked Gopi whether he heard anything back from the development team.

 

Do you have anything new from your side?

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 7 of 18
RyanCameron
in reply to: jeremytammik

We were still waiting to hear back.  Nothing new.  Originally I didn't think this would be such an undertaking since we don't necessarily need it to be a circle example, it could be a right-click and slider bar series of commands that works with the right-click commands panel.  The trick is getting it coded to read from the ribbon.  Which, again is something Inventor, 3dsMax, Maya, Fusion... all do.  I'll poke around tonight or tomorrow to see what I can do.

RB Cameron, AIA, LEED AP, EDAC
Digital Practice Leader

Message 8 of 18
bburling
in reply to: RyanCameron

I think alot can be achieved with the postcommand function. Hope you don't mind but i took your idea and gave it a crack....

 

Firstly i created a form with the wheel as the background. I created a public property on the form which is the id of the command to issue:

 

Public CommandToIssue As RevitCommandId

 I then created transparent picture boxes over the various icons. Clicking on a picturebox asigns a command id and closes the form:

 

        Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
            CommandToIssue = RevitCommandId.LookupPostableCommandId(PostableCommand.StructuralColumn)
            Close()
        End Sub

 

Under the forms show event i added code to locate the form at the mouses current position:

 

        Private Sub WheelForm_Shown(sender As Object, e As EventArgs) Handles Me.Shown
            Location = New System.Drawing.Point(CInt(MousePosition.X - (Me.Width / 2)), CInt(MousePosition.Y - (Me.Width / 2)))
        End Sub

 Finally I setup a command to display the wheel, and post the command:

 

Option Strict On
Option Explicit On

Imports Autodesk.Revit.Attributes
Imports Autodesk.Revit.UI

Imports BrevitTools.UI.Wheel

    <Transaction(TransactionMode.Manual)> _
    Public Class Wheel
        Implements IExternalCommand

        Public Function Execute(cmdData As ExternalCommandData, ByRef message As String, elements As Autodesk.Revit.DB.ElementSet) As Result Implements IExternalCommand.Execute

            Dim form As New WheelForm
            form.ShowDialog()

            If form.CommandToIssue IsNot Nothing Then
                cmdData.Application.PostCommand(form.CommandToIssue)
            End If

            Return Result.Succeeded

        End Function

    End Class

 To display the wheel inside revit I assigned a shotcut key (ww)

 

Here is link to a video of it in action:

https://www.youtube.com/watch?v=lYrpJe2484E&feature=youtu.be

 

I think there is loads of potential for this. You could easily add code to check what elements are preselected and then display a contextual wheel.

 

 

 

Brett.

 

 

 

 

 

 

Regards,
Brett
Message 9 of 18
jeremytammik
in reply to: bburling

Dear Brett,

 

Thank you very much for this nice implementation.

 

I cleaned up and summarised the discussion on The Building Coder:

 

http://thebuildingcoder.typepad.com/blog/2014/04/revit-2015-api-news-devdays-online-recording.html#2

 

I hope you like it.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 10 of 18
rcameron
in reply to: jeremytammik

Thanks a ton Brett!  I'm going to reach out to you through the forum email and linkedIN.  I appreciate your hard work on this!  Very cool!

Message 11 of 18
R.van.den.Bor
in reply to: rcameron

Yep, looks very nice Idea and would be great to have I standard Revit aswell 🙂
Kind regards,
Remy van den Bor
ICN Solutions B.V.
Liked this post or found it usefull, don't forget the Kudo It won't hurt (at least not me).
Message 12 of 18
PhillipM
in reply to: R.van.den.Bor

Well we had a rainy day here during the weekend so I spent a couple of hours throwing together some code. Smiley Happy

 

Here is my implementation of a right mouse click wheel menu in Revit.

 

http://www.kcsl.biz/#!blog/clp2

 

Cheers

Phillip

 

 

Message 13 of 18
bburling
in reply to: PhillipM

 

Nice! I particually like the animation of the wheel very smooth. Did you build the Wheel from scratch or have you used a pre-built package?

  

Brett

 

Regards,
Brett
Message 14 of 18
PhillipM
in reply to: bburling

Hi Brett

 

No I only spent a couple of hours on this project, so I wasn't going to be designing the wheel as well.

 

I use http://www.devcomponents.com/ for my components and it just happens that one of them was a radial wheel, so that made the task pretty easy 🙂

 

If you search the web there are a few other pre built wheels on the market.

 

Regards

 

Phillip

Message 15 of 18
csavopoulos
in reply to: RyanCameron

This is a great idea. This is an essential tool, especially if you are spending 8+ hours each day using Revit.

 

Where do I sign up? Smiley Wink

 

I would really like to have access to this design:

 

Revit User Interface.jpg

 

Please let me know if this will be released to the public or if we need to purchase.

 

Respectfully,

 

Corbin

 

Message 16 of 18

Just an FYI...

 

There is a fully customizable add-in that works exactly like what this forum topic is trying to achieve:

 

http://www.kiwicodes.com/products/41-quick-menu.html

 

It works pretty darn well!!

Charles Berteaux IV
EDT BIM/VDC/Technology Department Manager | SSOE Group | Hillsboro
www.ssoe.com

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Message 17 of 18

Thanks Charles. You nailed it! I worked with Philip at kiwi to make this dream wheel of mine a reality!  Glad you like it!  Please tell more people about it. It seems like most softwares out there today have the circle interface. Have you tried FormIt yet?  😉

 

RB Cameron, AIA, LEED AP, EDAC
Digital Practice Leader

Message 18 of 18

Not yet, we have people playing around with the beta web version, we primarily use sketchup, but I am hopefully going to get that changed Smiley Wink

 

 

Charles Berteaux IV
EDT BIM/VDC/Technology Department Manager | SSOE Group | Hillsboro
www.ssoe.com

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community