Default instance properties for "non-family types"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
One of the great features of the Revit UI is when you create an element using the built-in commands (wall, detail line, component, etc), the properties palette can be used to specify the type and the instance parameters of the object to be created. Can this feature be used in a way with ExternalCommands?
My goal is to avoid recreating the same UI in my ExternalCommands what is already available in the Revit UI. I realize the default types are exposed to the Revit API, which is a great start. What I am missing is the default instance parameters for “Non-family types” - as the Developer’s guide defines them. Part of my focus is Rebar, which have quite many instance parameters for which I have to create dropdowns and textboxes in my addin. Not to mention project parameters and rebar specific features like rounding and custom hooks.
What gives me hope is that for certain element categories like Detail Lines when you initiate the built-in command in the UI and change an instance parameter like Line Style, you get a “Modify element attributes” item in the undo history, and also flags the document as unsaved - prompts to save when closing. I tried to hook into the DocumentChanged event using the ChangesMonitor SDK sample, but it gave me no result.
A slighly distressing addition, the same process done with Rebar leaves no undo history. When I start the rebar tool, change an instance parameter like Partition, no undo item gets generated. Then I place the rebar, quit the command, start the rebar command again, and the Partition parameter is preserved. Something must have changed, though in this case there is even less trace of it.
Any recommendations? Even if this is not exposed to the API, what is your preferred solution to handling large numbers of instance parameters when placing elements? Do you build a UI similar to the properties palette?
Developer Advocacy and Support +