Questions tagged [revit-api]

Revit's API allows users to create customizations of the Autodesk Revit environment with tools that can greatly enhance end users' capabilities. The program is built around Microsoft's .NET Framework.

Revit's API allows users to create customize the environment with tools that can greatly enhance end users capabilities. The program is built around Microsoft's .NET Framework.

Resources:

Forums:

977 questions
2
votes
0 answers

I have a program using GetAnalytical that was tested, but suddenly fails

(see my comment below for answer) I have a program, rigorously tested (I thought) that uses: Options options = new Options(); AnalyticalModel model = Source_Beam.GetAnalyticalModel() as AnalyticalModel; ; Curve Curvy = model.GetCurve(); XYZ End1 =…
KeachyPeen
  • 147
  • 2
  • 13
2
votes
1 answer

Revit C# API Override graphics in View Surface Pattern

I am attempting to assign options to a Revit OverrideGraphicsSettings: OverrideGraphicSettings org = new OverrideGraphicSettings(); org.SetHalftone(true); org.SetProjectionLineColor(Use_Color);…
KeachyPeen
  • 147
  • 2
  • 13
2
votes
2 answers

Revit C# API Rename or Add Parameter inside Family

I modified a number of Revit Beam and Column families to add a parameter to be used to associate a series of model elements for scheduling purposes. Now my boss has asked me to change the name of that parameter (from the name he had first…
KeachyPeen
  • 147
  • 2
  • 13
2
votes
2 answers

Revit API AddInCommandBinding for ID_PROCESS_DROP

I'm trying to bind the drag/drop of a family into the project and disable it. My code is based on the Revit 2014 SDK Sample DisableCommand My code has the .CanHaveBinding test and I have a dialog that displays success or failure. When I run the…
BigBadBIM
  • 21
  • 1
2
votes
1 answer

Revit C# run code "OnShutDown" and "OnStartup"

The Revit SDK sample for "AIPAppStartup" has prebuilt sections for code to the executed "OnShutDown" (when closing Revit session) or "OnStartup" (when starting Revit session), but I want to be able to run code for each document loaded. …
KeachyPeen
  • 147
  • 2
  • 13
2
votes
1 answer

Revit API: How to create Element Keynote for a wall and Material Keynote?

I'm trying to create Element Keynote for a wall and Material Keynote for it's materials (to make it like in this image bit I'm completely stuck with it. I tried to create a tag how it was shown in this blog post:…
cansadadeserfeliz
  • 3,033
  • 5
  • 34
  • 50
2
votes
1 answer

Finding the coordinates for basepoint in revit api

I have created a plugin that calculates the intersections between grids. The coordinates from the intersection calculation are using the basepoint position as the origin of the coordinates. I want to convert the coordinates to the Survey Point…
Krigsdal
  • 31
  • 1
  • 7
1
vote
1 answer

Can´t get the "IscommandAvailable" to work

This is my first question here. I'm a beginner in revit api programming, so I'm sorry if my question is too lame or missoriented. Hope someone can help me. I´m triying to implement the Iscommand available method in this simple learning example and I…
1
vote
1 answer

Change the ActiveUIDocument

Is there a way through the Revit API to change which document is the current ActiveUIDocument (ExternalCommandData.Application.ActiveUIDocument)? I want to print multiple views from multiple project files using the API but I need to be able to…
skeletank
  • 2,880
  • 5
  • 43
  • 75
1
vote
1 answer

Revit API: Custom ModelLine

We're developing a plugin for revit to determine sections of a construction plan. Therefore we need something like model lines, but they need to be bound to a certain level. We also need to add custom Properties to these elements. What should I use?…
Gottox
  • 682
  • 6
  • 15
1
vote
0 answers

Get CompoundStructureLayer Face

Is there any way with the Revit API to retrieve the faces of a CompoundStructureLayer? Here is my current "extract layers" code: CompoundStructure compoundStructure = wall.WallType.GetCompoundStructure(); IList layers =…
Izzy Rodriguez
  • 2,097
  • 3
  • 21
  • 32
1
vote
1 answer

Hide elements in Sheets or Revit Document

I am Having a doubt in Revit API. I want to hide some elements in Sheets of the Revit document. But I need an Active view to hide that. view.HideElements(ids) If I take a view which is active and try to hide elements in it, I am getting exception…
Rocker-APK
  • 51
  • 6
1
vote
0 answers

Make Python scripts as an Addin for Revit

How to pack Python scripts as a standalone add-in for Revit, hiding the code from users? I am currently using pyRevit to create Python scripts for Revit. However, I want to create a stand-alone add-in that does not require pyRevit to be installed. I…
ehudahan
  • 11
  • 1
1
vote
1 answer

Need to extract family data from the Revit model using Design Automation API?

There is a query regarding Design Automation API: I have created a Revit plugin to extract Family data and it is also working fine with Revit Desktop application, But when I am executing it with the Design Automation API I am getting…
1
vote
1 answer

How to save Family to a new file

Using Revit API and without using Revit UI, I want to save a loaded family into a new file. Let's take a look at the following code: using (Transaction transaction = new Transaction(document)) { transaction.Start("Load and Save…