revit-api

Logging in Revit Design Automation add-in

一笑奈何 提交于 2020-06-17 15:52:20
问题 I want to send some diagnostic output to the default report.txt file. In some posts it is shown that exceptions are logged to this report.txt file somehow (automatically or not?). Also, I see in some samples that people do the logging with System.Console.WriteLine() , I've tried this, but still can't see it in the report file. Could you tell me, how to achieve this? I understand there is an option to create another log file and send it back with the result, but I think it would be easier to

Revit API - C# - How to set View Title on Viewport

旧街凉风 提交于 2020-05-17 06:48:08
问题 I'm trying to set a view title to show up on a Revit project using the Revit API however I can't figure out how to access it. I'm able to place a viewport on the sheet and load the view title family into the project but I'm not able to assign the loaded view title to the viewport. Has anyone had any luck with this? Here are some pics of what I'm trying to do: 1) The view is placed on the sheet. not a problem 2) Edit type of view and change view title use "View Title w sheet" 3) Change show

Revit API WinForms - Passing ComboBox value back to Command

本秂侑毒 提交于 2020-04-30 09:21:52
问题 I'm trying to pass a value(an element id) from a WinForm back to the Command.cs file but I'm getting an error: System.NullReferenceException: Object reference not set to an instance of an object. at BatchSheetMaker.Command.Execute(ExternalCommandData commandData, String& message, ElementSet elements) I'm following the youtube tutorial here and it seems fairly easy and straight forward but passing back to the Command.cs is another layer of complexity. I have the Command.cs code wrapped in a

C# Revit API - How to pull info from autocad File

╄→尐↘猪︶ㄣ 提交于 2020-03-24 00:05:33
问题 I've been working on this for the past month and am trying to get the final connection. so far, I can open Revit, execute an Autocad DLL from a Revit button however I don't know how to pull the information back into the Revit API. I have tried a couple of different methods however I've come to a wall. Here are the options I've tried with explanations below 1) Combine the DLL file and the Revit Button API file into one using classes. ---> Trying this method leaves me with an error when loading

Initiate BIM360 Docs collaboration programmatically

☆樱花仙子☆ 提交于 2020-03-05 00:34:13
问题 In order to upgrade to the current version of Revit, we have to migrate our files from from BIM360 Teams to BIM360 Docs. Since we have hundreds of documents, I am looking to automate this process as much as possible. The forge API allows me to download all Revit files from BIM360 Teams. I am also able to upgrade them all to Revit 2019, using either the Revit API or a third party app such as this Bulk File Upgrader`. Using the Forge BIM360 API, I am able to create new projects programmatically