pyrevit

How to access all the family types through revit API?

泄露秘密 提交于 2021-02-08 04:13:59
问题 Is it possible to access all the family types of a certain category (e.g. Windows, Doors, ...) with Revit API? In contrast with the instances. For what I know, using FilteredElementCollector(doc).OfCategory(...).ToElements() or FilteredElementCollector(doc).OfClass(...).ToElements() point to the instances of that class/type, but I want to check if a particular type is already loaded within Revit, even if it hasn't been instantiated yet. (I'm using pyRevit, Revit 2017) Thanks a lot! 回答1: In

How to access all the family types through revit API?

孤者浪人 提交于 2021-02-08 04:12:15
问题 Is it possible to access all the family types of a certain category (e.g. Windows, Doors, ...) with Revit API? In contrast with the instances. For what I know, using FilteredElementCollector(doc).OfCategory(...).ToElements() or FilteredElementCollector(doc).OfClass(...).ToElements() point to the instances of that class/type, but I want to check if a particular type is already loaded within Revit, even if it hasn't been instantiated yet. (I'm using pyRevit, Revit 2017) Thanks a lot! 回答1: In

pyRevit WPF non-modal trouble

匆匆过客 提交于 2021-01-04 06:42:34
问题 So I'm just starting to dip my toes into WPF in pyRevit. I tried to implement the pyrevit.forms.WPFWindow Class like this: # -*- coding: UTF-8 -*- """ Third-Party software credits: pyRevit: repository at https://github.com/eirannejad/pyRevit """ import System, clr, json, sys clr.AddReference("System.Windows.Forms") clr.AddReference('IronPython.Wpf') import wpf from Autodesk.Revit.DB import * from pyrevit import revit, script, forms class FactorySettings(forms.WPFWindow): def __init__(self):

pyRevit WPF non-modal trouble

非 Y 不嫁゛ 提交于 2021-01-04 06:42:05
问题 So I'm just starting to dip my toes into WPF in pyRevit. I tried to implement the pyrevit.forms.WPFWindow Class like this: # -*- coding: UTF-8 -*- """ Third-Party software credits: pyRevit: repository at https://github.com/eirannejad/pyRevit """ import System, clr, json, sys clr.AddReference("System.Windows.Forms") clr.AddReference('IronPython.Wpf') import wpf from Autodesk.Revit.DB import * from pyrevit import revit, script, forms class FactorySettings(forms.WPFWindow): def __init__(self):

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

Accessing Revit API from outside Revit

元气小坏坏 提交于 2019-12-10 09:36:22
问题 I've used RevitPythonShell and Dynamo, but would like to use my existing Python IDE (Eclipse) where I have my configuration for logging, debugging, GitHub integration, etc. I'm comfortable with transactions and the overall API, and I've invested some time in reading about the Revit API and modeless connections, and others asking similar questions. Some of them are a few years old. Is it currently possible to interact with Revit from Python executed outside Revit? For example, I've tried;

Coding with Revit API: tips to reduce memory use?

江枫思渺然 提交于 2019-12-06 11:33:44
问题 I have a quite 'general' question. I am developing with Revit API (with python), and I am sometimes observing that the Revit session gets slower during my tests and trials (the longer Revit stays open, the more it seems to happen). It's not getting to the point where it would be really problematic, but it made me think about it anyway.. So, since I have no programming background, I am pretty sure that my code is filled with really 'unorthodox' things that could be far better. Would there be

Accessing Revit API from outside Revit

最后都变了- 提交于 2019-12-05 12:12:23
I've used RevitPythonShell and Dynamo, but would like to use my existing Python IDE (Eclipse) where I have my configuration for logging, debugging, GitHub integration, etc. I'm comfortable with transactions and the overall API, and I've invested some time in reading about the Revit API and modeless connections, and others asking similar questions. Some of them are a few years old. Is it currently possible to interact with Revit from Python executed outside Revit? For example, I've tried; import clr clr.AddReference(r'C:\Program Files\Autodesk\Revit 2016\RevitAPI') import Autodesk.Revit.DB as