Hello! Tell me how to work with UI on WPF app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I recently switched from the Dynamo environment to Visual Studio to start writing more interesting things and immediately had some questions:
1. Is there any clearer documentation on RevitAPI instead of the official one? There are a lot of things that are not needed, and what is needed is poorly described (the same revitapidocs).
2. Is there an opportunity in Revit to replace the geometry of an element? Let's say I have a class that looks for the intersection of the surface of an element with a wall edge, if such an element is located, then an object of the DirectShare class remains from it, and the originally lying object of the FamilyInstance class is deleted. Can I call DirectShare to Solid, and then turn to the element and tell it to take this geometry instead of its own? Or is there some other way? The main thing for me is that after pruning there remains an element of the same family lying earlier, but of a different shape. In Dynamo, such an algorithm is implemented using a deep analysis of the geometry and recording the values obtained in the parameters of the family.
3. I have a solution that contains 2 projects. The first is the "initializer" it contains the structure of the Revit tab, panels, buttons, as well as commands for miniprograms, according to the type of trimming that do not require an interface and a command to launch the second project. The second one assumes advanced functionality due to its own interface and commands described inside this project (working independently of the first one, but closely related to it), written in WPF and C#. So here's the question: how can I transfer Revit documents and attributes to a project with WPF to do all the calculations there, and not constantly refer to the first project? And is such a structure appropriate?
Perhaps there is some event that allows you to transfer the document to another project and work through it. Looking at Revit Lookup, this is quite real. I'm work in Revit 2021.
Thank you so much in advance for the answers.
Developer Advocacy and Support +