User defined family palette

User defined family palette

denisyukJ
Advocate Advocate
502 Views
4 Replies
Message 1 of 5

User defined family palette

denisyukJ
Advocate
Advocate

I want to implement  "User defined family palette" which is kind of small project browser. It shouls be separate window consisting only names of families chosen by user. The broblem is I am API newbee. Can some of you give me a direction to search? 

Below is attempt of graphcal implementation of what I want to do.

denisyukJ_0-1661175070984.png

I'll appreciate any help.

0 Likes
503 Views
4 Replies
Replies (4)
Message 2 of 5

sragan
Collaborator
Collaborator

Are you also a newbie at C#, or do you have some experience programming with C#.

 

The key to getting what you want would be to break it down into small steps, and complete one step at a time.  Like this:

Step 1;  Get a small basic revit API program to work.

Step 2:  Figure out how to make a form.  Then load the form, and select data from the form.
Step 3:  Get families from a Revit file.   Add them to a list on the form.
Step 4:  .....

 

You get the idea.

 

I use a slightly simpler method for electrical work, and its similar to how I worked in Autocad.   I have a form that loads with a keyboard shortcut.  The form has a blank line to input text, and the program uses a .CSV file to select a family and place it.   For example, "in" brings up the form, and typing "du" sends the program to look through the CSV file for "du", where it finds the family name and type of a duplex.   It then inserts the duplex if the family is already in the project, or it tries to load the family from a file if it isn't found.  

 

Its a quick easy way to access the most commonly used families.     

0 Likes
Message 3 of 5

denisyukJ
Advocate
Advocate

I am familiar with Python and did some automaion within Dynamo and pyRevit, but haven't experience with WPF.  

The idea you've implemented sounds very interesting. Does it work fast?

Message 4 of 5

sragan
Collaborator
Collaborator

Are you asking if the add in I created runs fast?  Yes, there is no delay when running it.


WPF is actually a newer way to add forms into an application.   There is the older "Windows Forms" method also.  Its probably easier for starting.   WPF is more powerful, and with it you can create forms that are similar to the "properties pallete".  That is you can create a form that is always open, and can be moved or resized or docked.  With Windows Forms, its easiest to use the "ShowDialog" method, but then the form has focus as long as its open, and you can't access Revit until the form is closed (that is you can't select more objects or zoom around, etc.)

 

Simple Form Example - Autodesk Community - Revit Products

 

 

0 Likes
Message 5 of 5

denisyukJ
Advocate
Advocate

Great, thank you. I will try.

0 Likes