Git Product home page Git Product logo

dynamorevit's Introduction

Dynamo for Revit

Dynamo for Revit is a plugin for Revit and a library of Dynamo Nodes. It's also often referred to as DynamoRevit or D4R for short.

Dynamo for Revit has different branches for different versions of Revit. For example, to run Dynamo for Revit on Revit 2016 you want the Dynamo for Revit 2016 branch.

How to build and use DynamoRevit

To use a locally built DynamoRevit plugin inside Revit, you'll need to do three things:

  1. Build DynamoRevit
  2. Get or Build Dynamo Core
  3. Associate DynamoRevit with DynamoCore
  4. Create a Revit Addin

1. Build DynamoRevit

  • Clone the DynamoRevit repository.
git clone https://github.com/DynamoDS/DynamoRevit.git
  • Get the branch for the version of Revit you want to use. For the latest release of Revit or a preview release, master may be fine. Otherwise, run git checkout Revit2019 or similar.
  • Make sure you have the following installed on your computer:
  • Run restorepackages.bat from a command prompt with administrative privileges (Located in your Github\DynamoRevit\src folder) Note: restorepackages.bat employs the use of a legacy tool aget.exe, which requires VC++ 2010 redistributable installed, before you can run it. When missing you will get an msvcr100.dll not found error.
  • Copy RevitAPI.dll&RevitAPIUI.dll to the folder DynamoRevit\lib\Revit Preview Release\net48, these 2 dlls are in the folder same with Revit.exe installed on your computer (if you want to build other branch of DynamoRevit, but corresponding version of Revit is not installed locally, you can get these dlls from https://www.nuget.org/ )
  • Set the RevitVersionNumber environment variable to the Revit version you're building against (e.g. 2020) either in the system environment or in the user_locals.props file in your build folder.
  • Open DynamoRevit.All.sln in Visual Studio, and select a build configuration (Debug | Release)
    • For Revit 2025 (currently Preview Release) and newer you need Visual Studio 2022 (17.8.0 or newer)

2. Get or Build Dynamo Core

It's often helpful to build both DynamoRevit and Dynamo Core from source. To do that:

  • Clone Dynamo Core from https://github.com/dynamods/dynamo
  • Get the branch for the version of Dynamo that you want to use. For the latest release of Revit or a preview release, master is fine. Otherwise, run git checkout RC2.2.0_master or similar.
  • Build Dynamo according to the instructions in the README.

It's also possible to use the prebuilt Dynamo that ships with Revit, or to retrieve a particular Dynamo Core version from Nuget without building it yourself. These approaches need to be documented.

3. Associate DynamoRevit with Dynamo Core

After DynamoRevit is built, you will notice that there is a Dynamo.config file in DynamoRevit\bin\AnyCPU\Debug[Or Release]. With this file you must specify which DynamoCore you want to run with the DynamoRevit build.

For example, if you specify

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
     <add key="DynamoRuntime" value="C:\Workspace\GitHub\Dynamo\bin\AnyCPU\Debug"/>
  </appSettings>
</configuration>

you will run DynamoRevit with the DynamoCore at C:\Workspace\GitHub\Dynamo\bin\AnyCPU\Debug. This is especially useful when you want to test the DynamoRevit built with different flavors of DynamoCore, or you are using RTF to test a built version of DynamoRevit. Rebuilding will overwrite this file, so you must replace the path each time you build.

4. Create a Revit Addin

Starting in Revit 2020, there is a version of DynamoCore and the DynamoRevit addin included in the Revit install folder. First, remove or delete the DynamoForRevit addin folder from the following location: C:\Program Files\Autodesk\Revit 2020\AddIns

For development, you'll have to manually create an addin file that instructs Revit to load the plugin on startup. A DynamoRevit addin file looks like this:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<RevitAddIns>
  <AddIn Type="Application">
    <Name>Dynamo For Revit</Name>
    <Assembly>"D:\DynamoRevit\bin\AnyCPU\Debug\Revit\DynamoRevitDS.dll"</Assembly>
    <AddInId>8D83C886-B739-4ACD-A9DB-1BC78F315B2B</AddInId>
    <FullClassName>Dynamo.Applications.DynamoRevitApp</FullClassName>
    <VendorId>ADSK</VendorId>
    <VendorDescription>Dynamo</VendorDescription>
  </AddIn>
</RevitAddIns>

This .addin file should be placed in the following location:

  • ProgramData/Autodesk/Revit/Addins/<version>

where <version> is the version of Revit for which the addin is built. Notice that the Assembly tag points to the output folder of the Dynamo for Revit build you created in step 1.

Now you should be able to launch Revit and see the Dynamo and Dynamo Player icons on the Manage tab. If you experience issues, check the troubleshooting tips in the next section.

Troubleshooting Build Issues

  • Make sure you ran restorepackages.bat in a command prompt with administrator privileges. It creates soft links for all the NuGet packages folder dropping the version information so that the projects files don't need to be changed when package versions are changed. The package versions are defined in the packages-template.aget file. LatestBeta is used for Dynamo specific packages to automatically download the latest beta packages.

  • If you see errors like:

    1>c:\Users\bykovsm\AppData\Local\Temp\AssemblySharedInfo.tt(1,1): error CS1519: Compiling transformation: Invalid token 'this' in class, struct, or interface member declaration
    1>c:\Users\bykovsm\AppData\Local\Temp\AssemblySharedInfo.tt(1,6): error CS1520: Compiling transformation: Method must have a return type
    

    then you need to get rid of any white space in the last line of DynamoRevit/src/AssemblyInfoGenerator/transform_all.tt. It's also possible that transform_all.bat is looking for a text templating engine for a version of visual studio you do not have installed.

  • If you see missing classes or namespaces from the Revit or Dynamo APIs, look at the environment variable values in CS.props. These environment variables can be overwritten by providing correct path for Dynamo and Revit libraries in user_locals.props

  • If your addin is not appearing in Revit, try removing any old copies of the Dynamo.addin file from these locations:

    • Users/<user>/AppData/Roaming/Autodesk/Revit/Addins/<version>
    • ProgramFiles/Autodesk/Revit <version>/AddIns
  • Revit 2020 and later do not use the DynamoVersionSelector by default, but it's still in the DynamoRevit build. If you'd like to try using it, you can create a Dynamo.addin file that looks like this:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<RevitAddIns>
  <AddIn Type="Application">
    <Name>Dynamo For Revit</Name>
    <Assembly>"E:\MyGitPath\Dynamo\bin\AnyCPU\Debug\Revit_xxxx\DynamoRevitVersionSelector.dll"</Assembly>
    <AddInId>8D83C886-B739-4ACD-A9DB-1BC78F315B2B</AddInId>
    <FullClassName>Dynamo.Applications.VersionLoader</FullClassName>
    <VendorId>ADSK</VendorId>
    <VendorDescription>Dynamo</VendorDescription>
  </AddIn>
</RevitAddIns>

Running DynamoRevit Tests with RevitTestFramework

(This documentation is a work in progress, still being assembled and verified from internal documents) For more information, see https://github.com/DynamoDS/RevitTestFramework/blob/master/README.md

Option 1: RevitTestFrameworkConsole.exe

A console application which allows running RTF without a user interface. If you'd like to learn more about the command line options for RTF, you can simply type "RevitTestFrameworkConsole -h".

As an example, the following command:

RevitTestFrameworkConsole.exe --dir [DynamoRevit dev root]\test\System -a [DynamoRevit dev root]\bin\AnyCPU\Debug\Revit\RevitSystemTests.dll -r MyTestResults.xml -revit:"C:\Program Files\Autodesk\Revit 2019\Revit.exe" --copyAddins --continuous

will execute all tests in MyTest.dll located in C:\MyTestDir and place all results in MyTestResults.xml (in the same folder). It will use Revit 2019 as specified and will run all tests without shutting down Revit.

If you use dev package, another example:

RevitTestFrameworkConsole.exe --dir [DynamoRevit dev root]\test\System -a [DynamoRevit dev root]\bin\AnyCPU\Debug\Revit\RevitSystemTests.dll -r MyTestResults.xml -revit:"D:\Revit\Revit.exe" --continuous

You specified a non-normally installed Revit.exe, you do not need to add the '--copyAddins' parameter. You need to manually copy a Dynamo.addin file to your working directory 'C:\MyTestDir'.

Option 2: RevitTestFrameworkGUI.exe (This only supports Revit install build)

Provides a visual interface for you to choose tests from a treeview and to visualize the results of the tests as they are run. The same settings provided in the command line argument help above are available in the UI. The UI also allows you to save your testing session.

The input fields to set the test assembly, the working directory, and the results file, as well as the tree view where available tests are displayed, support dragging and dropping of files and folders.

  • Test Assembly is your dll to test.
  • Working Directory is the folder contains your test Revit file and dyn file like Empty.rvt and D4RCreateWallSystemTests.dyn.
  • Additional Resolution Directories are the DynamoCore and DynamoRevit locations you want to use to run the test (Do they need to match what's in the Dynamo.addin file?)
  • Revit 2020 you can choose which Revit version you want to use in this DropDown List. (Only installed versions of Revit.)

dynamorevit's People

Contributors

alfarok avatar andydu1985 avatar aparajit-pratap avatar avidit avatar benglin avatar bogdanzavu avatar chuanyuee avatar ke-yu avatar ksobon avatar lukechurch avatar mikhinja avatar mjkkirschner avatar mnhng avatar moethu avatar pboyer avatar qilongtang avatar ramramps avatar randy-ma avatar riteshchandawar avatar rk-lakshmanan avatar sancerio avatar sh4nnongoh avatar sharadkjaiswal avatar shknudsen avatar sm6srw avatar steell avatar theanh0512 avatar vmoyseenko avatar ziyunshang avatar zora-wang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dynamorevit's Issues

FamilyInstance.SetRotation crashes at angle 270

Dynamo version

1.0.0 (issue also occurs in 0.9.2)

Revit version

Revit 2016

Operating system

Windows 7

What did you do?

Select model element (placed family) => FamilyInstance.SetRotation with a rotation angle of 270

What did you expect to see?

rotated family

What did you see instead?

revit and dynamo are totally hosed, hard crash

FamilyInstance.SetRotation rotates clockwise, while dynamo rotates counter-clockwise

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

1.0.0 (also occurs in 0.9.2)

Revit version

Revit 2016

Operating system

Windows 7

What did you do?

Use FamilyInstance.SetRotation

What did you expect to see?

Positive angles rotate counter-clockwise, negative rotates clockwise (standard 3d modeling convention, other dynamo rotation nodes also operate this way)

What did you see instead?

Negative angles rotate counter-clockwise, positive rotates clockwise

Dynamo can't launch from Ribbon - Reflection - System.TypeLoadException thrown

Dynamo version

1.0.0

Revit version

2016 R2 UR4

Operating system

Win 10

What did you do?

Click the Button

What did you expect to see?

Dynamo

What did you see instead?

Exception was thrown from the ExternalCommand- System.TypeLoadException: Could not load type 'Dynamo.Models.DynamoModel' from assembly 'Autodesk.Bcg, Version=1.7.3.0, Culture=neutral, PublicKeyToken=d672471c03b2c408'.
' at Dynamo.Applications.DynamoRevit.ExecuteCommand(DynamoRevitCommandData commandData)
' at apiManagedExecuteCommand(AString* assemblyName, AString* className, AString* vendorDescription, MFCApp* pMFCApp, DBView* pDBView, AString* message, Set<ElementId,std::less,tnallc >* ids, Map<AString,AString,std::less,tnallc<std::pair<AString const ,AString> > >* data, AString* exceptionName, AString* exceptionMessage)
' 1:< System.TypeLoadException: Could not load type 'Dynamo.Models.DynamoModel' from assembly 'Autodesk.Bcg, Version=1.7.3.0, Culture=neutral, PublicKeyToken=d672471c03b2c408'.
' at Dynamo.Applications.DynamoRevit.ExecuteCommand(DynamoRevitCommandData commandData)
' at apiManagedExecuteCommand(AString* assemblyName, AString* className, AString* vendorDescription, MFCApp* pMFCApp, DBView* pDBView, AString* message, Set<ElementId,std::less,tnallc >* ids, Map<AString,AString,std::less,tnallc<std::pair<AString const ,AString> > >* data, AString* exceptionName, AString* exceptionMessage)

image

Definition becoming unusable due to <SessionTraceData>

Dynamo version

1.0.0.1180

Revit version

2015 and 2016

Operating system

Windows 7 Pro SP1, 64GB RAM, Intel Xeon E5-1620 v3 @3.50GHz

What did you do?

I started experiencing several unjustified lags, Dynamo completely froze (and so Revit) for 10-20 minutes (or more) to complete actions that usually take a few seconds. It would happen when generating Revit elements, switching from Manual run mode to Automatic, other times just running the definition for the first time, other times just by creating a bunch of points.

I later on discovered that inside the .dyn file a huge portion of binary data was contained by a <SessionTraceData> tag (making up like 99% of the file size). I removed it and the file started behaving normally.

Is this a knows issue? Any way to avoid it in the short term?

The definition used generates a series of columns on several levels in Revit. But the issue started to happen even after breaking up the definition, eg just generating points:

Files: https://www.dropbox.com/sh/28gpnre12au9psy/AADJHHuoDcAPNkUUnsfxG0Zta?dl=0

image

image

File opens with broken Code Block + Python Script nodes

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

1.0.0.1180

Revit version

2015

Operating system

Windows 7

What did you do?

Reopen a file I had saved, after dynamo had crashed

What did you expect to see?

The file as I had saved it

What did you see instead?

python script editor is all black with no content, all code blocks have no input text field.
fileopenfail

file here:
520216_CurtainWallExplorations_D100.zip

Perspective view creation

I think there's something missing in the OOTB node: by default the view created is not cropped, resulting in a crappy useless view. and the setting is grayed in revit UI, so user can't switch it on.
the code should include this (in python here):
view.CropBoxActive = True

Wall.ByCurveAndHeight doing different things on subsequent runs

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

1.0

Revit version

2016

Operating system

Windows 7

What did you do?

Placed walls by curve and height and level once, and edited the base offset of one wall.

What did you expect to see?

nothing strange

What did you see instead?

At the first run, all walls sat directly on the level (as expected). Then, I made a modification to the base offset parameter of ONE of the walls. Then, on second run, ALL the walls jumped up to the elevation of the curve from which they were generated, without any change to their base offset parameter. See screen capture here: http://www.screencast.com/t/7VEl5B33C5mw

Categories dropdown node missing several categories

A while ago I reported that several categories in the Categories dropdown node were producing a warning. For a list of the affected categories and more information about the original issue, please refer to DynamoDS/Dynamo#4117

Apparently, the "fix" for this was to remove those categories from the dropdown entirely. This may sound harsh, but to me that is not a fix, it is ignoring the problem. The image below shows that
a) these categories are present in a Revit model (test was run on R2016) and
b) they can be queried with a FilteredElementCollector.

bic

If these categories are not supported we are back where we were with Dynamo 0.6 before the Categories and All Elements of Category nodes with people having to write their own Python-basedFilteredElementCollector nodes to retrieve elements from the model.
Please provide a proper fix.

dynamo crashes_27may16

Dynamo version

.1.201...447
(Which version of Dynamo are you using? Go to Help > About if you're not sure.)

Revit version

(Which version of Revit are you using?)
2017

Operating system

wn10
(e.g. Windows 7, Windows 8.1, etc)

What did you do?

launching dynamo on a new blank revit file.
(Fill in here)

What did you expect to see?

active dynamo.
(Fill in here)

What did you see instead?

it crashed>details....>

HRESULT: [0x8876086C], Module: [SharpDX.Direct3D9], ApiCode: [D3DERR_INVALIDCALL/InvalidCall], Message: Unknown

at SharpDX.Result.CheckError()
at SharpDX.Direct3D9.Direct3DEx.CreateDeviceEx(Int32 adapter, DeviceType deviceType, IntPtr hFocusWindow, Int32 behaviorFlags, PresentParameters[] presentationParametersRef, DisplayModeEx[] fullscreenDisplayModeRef, DeviceEx returnedDeviceInterfaceOut)
at HelixToolkit.Wpf.SharpDX.DX11ImageSource.StartD3D()
at HelixToolkit.Wpf.SharpDX.DX11ImageSource..ctor()
at HelixToolkit.Wpf.SharpDX.DPFCanvas.StartD3D()
at HelixToolkit.Wpf.SharpDX.DPFCanvas.RenderTechniquesManagerPropertyChanged()
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at HelixToolkit.Wpf.SharpDX.Viewport3DX.RenderTechniquesManagerPropertyChanged()
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
at System.Windows.Data.BindingExpression.Activate(Object item)
at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
at System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
at MS.Internal.Data.DataBindEngine.Run(Object arg)
at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Interop.HwndTarget.OnResize()
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
(Fill in here)

Custom node can only place family instance(s) in isolation. Multiple use of same CN on graph results in 'last node wins'

Dynamo version

1.0.0

Revit version

Revit 2016

Operating system

Win 10

What did you do?

I created a Custom Node which generates a prefab building using Adaptive Components (images shown below are not the original project, but a simplified example). As the master plan includes a number of these prefab buildings, the intention was to create a custom node and place multiple instances of it on the graph, each with its specific parameters/variables input to generate each prefab type required for the master plan.

What did you expect to see?

The required variations of the prefab buildings in their relative locations on the master plan generated by each instance of the Custom Node placed by the design team

What did you see instead?

Only one prefab building can be generated at a time. Every time a new CN is placed on the graph and its inputs satisfied with the required data, the Adaptive Components output from the previous CN disappear and are replaced by the Adaptive Components output from the new CN - in effect, a 'last node wins' scenario.

The attached images show the object IDs of the output Adaptive Components are identical for every instance of the CN placed on the graph. Hence, Revit removes the previous objects (Adaptive Components) and replaces them with the output from the new CN which indicates where the problem is emanating from.

Although Adaptive Components were used in the example/original problem, this issue affects CNs that place any Family instance type. If this is 'as intended' behaviour it represents a significant workflow flaw.

Output from example CN - one instance on the graph:
one cn generates adapative components
Output in Revit:
one cn generates adapative components output in revit

Output from example CN - multiple instances on the graph:
multiple cn generates only one set of adapative components
Output in Revit:
multiple cn generates only one set of adapative components output in revit

FaceAnalysisDisplay.ByViewFacePointsAndValues node only works on single surface

Dynamo version

0.9.2

Operating system

Windows 7

What did you do?

Run FaceAnalysisDisplay.ByViewFacePointsAndValues and FaceAnalysisDisplay.ByViewSurfaceData

What did you expect to see?

Coloured surfaces in Revit relating to analysis results

What did you see instead?

Node outputs more than one Revit.Display and only one surface gets colorized in Revit
I've also started a thread here:
http://dynamobim.org/forums/topic/face-analysis-display-by-view-face-points-and-values-node-bug/
archilab

Strange license display in Revit

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

1.0.0.1180

Revit version

2015

Operating system

Windows 7

What did you do?

Launch Dynamo "About" window

What did you expect to see?

image

What did you see instead?

image

Possibly related to DynamoDS/Dynamo#6631

Element.SetParameterByName intermittently fails for Sheet Number lists

Sending a long list of SetParameterByName - Sheet Number to a sheet list in Dynamo causes a seemingly random failure, and the message "The Parameter is read-only". However, closing and reopening Dynamo and re-running results in more success, until eventually all of the SetParameter operations have succeeded.

setparameter

Dynamo version

1.0.0

Revit version

2015

Operating system

Windows 10

What did you do?

Set Parameter Sheet Number to Sheet Elements

What did you expect to see?

100% success

What did you see instead?

Around 75% success at each Run.

Auto-generate Zero Touch Node classes to cover all element generation methods in Revit API.

The Idea

Implement tooling to auto-generate zero touch node classes to cover all element generation methods in the Revit 2017 API (and possibly more).

History

Two years ago, the Dynamo team had an internal project to attempt to wrap Revit API methods to make them work as nodes for Dynamo. This was when Dynamo's engine was written in F#. Initially, we tried doing this using .net reflection. But, the Revit API does not load correctly using reflection. Moreover, reflection gave us the names of methods and parameters, but did not give us any other helpful information which we would use to get descriptions for the node, the ports, etc. The RevitAPI.xml did give us this information however, so we wrote a python script which read types from this xml and emitted c# classes in individual .cs files.

A decision was made not to make this library public as it was a tight wrapping around the Revit API and the node names were not comprehensible to the user in the same way that Dynamo node names are. That is, they did not follow the static constructor pattern like Point.ByCoordinates(...), any they required that the user would need to know and understand specific Revit types, like CurveArrArray. It was deemed to big an effort at the time to create mappings between all of these types and names that were more Dynamo-like.

The original python script can be found here: https://github.com/DynamoDS/Dynamo/blob/e1944bcba7590f49e2860645a2d92f6d07f6fd97/tools/NodeGenerator/NodeGenerator.py.

Fast forward two years...

Reflecting over the Revit API still doesn't work. But a new effort to write c# tooling to use the RevitAPI.xml for auto-wrapping has begun here. The tools we've developed for Dynamo for Revit to do element binding, transaction management, etc. are much more sophisticated then what we had two years ago. The Element base class now contains a great deal of the logic for element binding, transaction management, etc. It is possible that an auto-generated library could use or extend this base class to make the auto-generated types as small as possible.

Benefits

Auto-generating Dynamo node classes to wrap the Revit API has several key benefits. First, we can rapidly expand the coverage of the Revit API that we expose as nodes to our Dynamo for Revit users. Second, an auto-generated node library would be fast to update when the Revit API is updated. Third RTF-compatible tests can be automatically generated. And finally, documentation for the node can be automatically generated by lifting the comments from the RevitAPI.xml file.

Challenges

For this type of auto-wrapping exercise there are several challenges which are detailed below. It is possible that a base class for our auto-generated types can exist which includes much of the functionality required when addressing these challenges, such that the auto-generated types need only tightly wrap the Revit API calls.

Element Binding

When an element is created, the element's id needs to be serialized and added to trace. This allows Dynamo to find that element in the Revit model on subsequent executions, so that that element does not need to be recreated. Element binding logic must be added to the auto-generated type's constructor. And must handle both the case where the element does not exist in Revit and is being created, and the case where the element is only being modified.

Document Modification Events

Dynamo for Revit listens for document modification events like when elements are added, modified, or deleted. Auto-generated types need to handle these three cases, and manage the serialized element ids in trace to keep Dynamo in sync with Revit. Most of this should be handled by Dynamo for Revit's DocumentManager.

Transaction Handling

Dynamo batches transactions to the extent that it is possible to do so. For example, if a node to the left of the graph requires that a transaction be started, then the transaction is opened and held open so that subsequent node executions can use the same transaction. Auto-generated types need to have the correct behavior with regards to transaction management, taking advantage of open transactions, and opening transactions where appropriate. Most of this should be handled by Dynamo for Revit's TransactionManager

Name Mapping

Dynamo uses static constructor for element creation with names which describe the required inputs, i.e. Wall.ByCurveAndHeight(...). As Revit API methods are not named in this way, a mapping will have to be defined in the type generator between the Revit API method and the design Dynamo-like naming. This mapping can be produced in a separate config file, so that the mapping can be edited by project stake-holders like @kronz, without having to edit the code.

Testing

Dynamo for Revit is tested using NUnit tests that are run with the Revit Test Framework. Auto-generated types would also need to generate unit tests which validate the basic conditions null/valid/invalid for all combinations on parameters.

Starting Small

We do not have to wrap the entire Revit API to start. A logical place to start would be methods in the Revit API which create and modify elements. Once those are stabilized, we can move to element properties, etc. The auto-generated types can go into their own library and be released early as beta functionality to gather community feedback.

Edge Cases

There will be edge cases. The first solution for these is to simply not generate node classes for the problematic types, and provide documentation somewhere listing these edge cases.

Direct Shape Materials not Displaying in Revit 2017

directshape not showing materials
directshape v1 not showing materials
directshape v9 showing materials

v1 Dynamo version

2017 Revit version

Win10

Make a DirectShape object based on a plane. Apply (green, or any colour) material

I expected to see a (green, or any colour)Direct Shape object

What did you see instead?

I saw a grey/clear object. Looks like normals are being flipped.

CurtainPanel.ByElement unreliable

As shown in the screenshot below, CurtanPanel.ByElement returns null as soon as a curtain wall contains door or window elements (which, in my experience, is typically the case). Nested wall elements or curtain walls luckily pose no problem.
cwp_limitations
As a first step, it would be great to not have the node fail to deliver those elements that are not doors or windows if such elements are present.
As a second step, it would be even better if doors or windows could also be returned. It makes a lot more sense to have a full inventory of all elements in a curtain wall/system.
Also, in 0.7.5 walls and curtain walls are actually being returned as belonging to the Walls category, not as Curtain Panels. That wasn't such a bad thing because it allows for easy filtering of the results...

package manager is empty

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

1.0

Revit version

2015

Operating system

windows 7

What did you do?

go to the package manager

What did you expect to see?

packages

What did you see instead?

(Fill in here)
image

Excel.WriteToFile needs local file path to the dyn file

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

1.0.0.1180

Revit version

16.0.1144.0
20160525_1230(x64)
Update5 for R2

Operating system

Windows 7 and Microsoft Excel 2007

What did you do?

wrote a dyn file to export room and area information into a template excel sheet. opened the revit model, opened dynamo, opened my dyn file, specified the file path for the excel template, and clicked run.

What did you expect to see?

the template excel file that is pathed to update.

What did you see instead?

trying to write to a file that is not local to the dyn file will return an error sometimes and write to a new excel file.
(https://github.com/DynamoDS/DynamoRevit/files/326692/RVTDASH_KDHC.xlsx)
capture

ImportInstance sends bad geometry

Hi,

I created a Solid geometry using Dynamo 0.8 that gets distorted when sent to Revit using ImportInstance.

I tried to use both
- a top to bottom loft with 4 guide curves,
- a loft using top, middle and bottom cross sections but I get the same result.

If it's exported as a SAT file and imported in Revit, the geometry is fine.

image

This is how it shows in Revit
image

image

If I increase the angle even more then it works ?!?
image

Revit.Elements.Category.InternalCategory property is scoped as internal and is not accessable.

So the internal category of the wrapped Revit category object is scoped as internal:

internal Autodesk.Revit.DB.Category InternalCategory

This makes the underlying Revit category object inaccessible to c# programs (like ZeroTouch) without using reflection or some other trickery. In contrast, the corresponding Revit.Elements.Element property, InternalElement, is scoped as public and works fine. Please change InternalCategory to public as well.

Flux - Select From List

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

1.0.1.1126

Revit version

2016

Operating system

Windows 7

What did you do?

I have a package from Flux. I selected the "Select From List" node.

What did you expect to see?

I expected to see a node that lists.

What did you see instead?

Instead, I received a "Dynamo has crashed" error. Below are the details:

Method not found: 'Void Dynamo.Graph.Nodes.PortModel.add_PortDisconnected(System.Action`1<Dynamo.Graph.Nodes.PortModel>)'.

at FluxPipe.Dynamo.NodeModels.FluxSelector..ctor()
at lambda_method(Closure )
at Dynamo.Wpf.ViewModels.NodeSearchElementViewModel.OnClicked()
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

NewFloor Method causing crash

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

1.0

Revit version

2016

Operating system

Windows 10

What did you do?

Tried flattened list of curves on Floor.ByOutlineTypeAndLevel node.
Tried same list as closed polycurve on same related node with polycurve input
Tried python revit api method Document.NewFloor method.

What did you expect to see?

A new floor in revit

What did you see instead?

a never ending loop until Revit crashes. I've tried rebuilding the curves in every which way but always causes Dynamo to crash.

Exception thrown using FamilyType.ByFamilyAndName in DesignScript definition

Dynamo Verison

1.0.0 Revit 2016

Operating system

Win 10

What did you do?

I created a DesignScript definition which converts a string (coming from Excel) to a Family Type.

What did you expect to see?

Return the specified Family Type from the input formatted/processed text

What did you see instead?

When I used the FamilyType.ByFamilyAndName method in DesignScript Dynamo throws an exception and deletes the Family from the project!

See the example image - it shows the same method working using the node. When I process the same data from Excel (although its in the format of "Family A"), I use the String methods to extract the Family Type (i.e. "A") and the same method shown in the image to return the Family - I also TrimWhiteSpace to rule out any rogue spaces. Then the error described above occurs.

using the node

Heres the diagnostics

Object reference not set to an instance of an object.

at Dynamo.UI.Controls.PreviewControl.<>c__DisplayClassc.b__b(AsyncTask m)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

dynamo crashed when launching on a new file of revit2017

HRESULT: [0x8876086C], Module: [SharpDX.Direct3D9], ApiCode: [D3DERR_INVALIDCALL/InvalidCall], Message: Unknown

at SharpDX.Result.CheckError()
at SharpDX.Direct3D9.Direct3DEx.CreateDeviceEx(Int32 adapter, DeviceType deviceType, IntPtr hFocusWindow, Int32 behaviorFlags, PresentParameters[] presentationParametersRef, DisplayModeEx[] fullscreenDisplayModeRef, DeviceEx returnedDeviceInterfaceOut)
at HelixToolkit.Wpf.SharpDX.DX11ImageSource.StartD3D()
at HelixToolkit.Wpf.SharpDX.DX11ImageSource..ctor()
at HelixToolkit.Wpf.SharpDX.DPFCanvas.StartD3D()
at HelixToolkit.Wpf.SharpDX.DPFCanvas.RenderTechniquesManagerPropertyChanged()
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at HelixToolkit.Wpf.SharpDX.Viewport3DX.RenderTechniquesManagerPropertyChanged()
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
at System.Windows.Data.BindingExpression.Activate(Object item)
at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
at System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
at MS.Internal.Data.DataBindEngine.Run(Object arg)
at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Interop.HwndTarget.OnResize()
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

DynamoInstall1.0.1.20160522T0056
(Which version of Dynamo are you using? Go to Help > About if you're not sure.)

Revit version

2017
(Which version of Revit are you using?)

Operating system

win10
(e.g. Windows 7, Windows 8.1, etc)

What did you do?

for a new revit file i tried to launch dynamo but it crashes.
(Fill in here)

What did you expect to see?

active dynamo interface
(Fill in here)

What did you see instead?

crashed
capture

(Fill in here)

Dynamo 0.6.3 crashes on exit in Revit 2012

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

0.6.3.7993

Revit version

Revit MEP 2012

Operating system

Win 7

What did you do?

As per suggested in Forum

  • I downloaded and installed the 0.6.3 build from the most stable section.
  • Installed it on my station for Revit 2013/2014
  • Opened Revit 2014, opened blank family, opened Dynamo, closed = OK
  • Found the addin file in 2014 folder and pasted it in 2012 folder (C:\ProgramData\Autodesk\Revit\Addins\2012)
  • Opened Revit MEP 2012, opened blank family, opened Dynamo, searched for 0.6 packages
  • Installed Lunchbox & Clockwork 0.6
  • File > Exit Dynamo

What did you expect to see?

Dynamo close normally

What did you see instead?

  • "Dynamo has crashed" message
    Could not load type 'Autodesk.Revit.UI.RevitCommandId' from assembly 'RevitAPIUI, Version=2012.0.0.0, Culture=neutral, PublicKeyToken=null'.

    at Dynamo.DynamoController_Revit.ShutDown(Boolean shutDownHost)
    at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
    at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate cal

Dynamo Packages:
image
File > Exit
image

Installing a package forces uninstall of other packages

Dynamo version

1.0

Revit version

2016 R2

Operating system

Windows 10

What did you do?

Installing Bakery package causes mayhem to already installed packages, which cannot be found out until Revit is restarted

image

Suggest at least a warning, and option to cancel the procedure.

saving while crashing erases file

I was working on a dyn that entered into a particularly long calc. I had already saved the file, so I wasn't worried about force-quitting. when I went to "end task," dynamo was responsive and brought up "do you want to save" - I didn't think anything of it, hit yes, and now my entire file has been overwritten by an empty one. This makes me very sad.

:'(

surface orientation rules with ImportInstance.ByGeometries

I am not sure I understand how this node is working because it tends to produce some weird results. I am using ImportInstance.ByGeometries to import geometry from Grasshopper to Revit. It seems to me that some faces are mirrored horizontally and some are rotated. Anyone else having that same issue?

capture
capture1

is this @pboyer @HLP or @kronz question?

ps. I tested this with Revit UI imports and same results. I tried going through In-place mass and then import. No luck.

Element.Geometry failure

Dynamo version

1.0.1.1164

Operating system

Windows10

What did you do?

Attempted to extract the geometry of a floor slab with an elliptical opening

What did you expect to see?

Geometry

What did you see instead?

20160428-1

Dynamo is great but tired off crashes.

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

8.1 and all most stable n daily builds. For this issue-8.1.
(Which version of Dynamo are you using? Go to Help > About if you're not sure.)

Revit version

2015-2016-2017.
(Which version of Revit are you using?)

Operating system

win 10
(e.g. Windows 7, Windows 8.1, etc)

What did you do?

i tried to run "Part-03-Editing-Multiple-Parameters" of module 1 of Advance curriculum on its corresponding rvt file....but every time n every version of revit and dynamo just crashed when pressing the run button.
(Fill in here)

What did you expect to see?

forms must be updated after run.
(Fill in here)

What did you see instead?

crashing always.
Please make a only one very stable dynamo. Thanks for this great soft.

Object reference not set to an instance of an object.

at Dynamo.Models.DynamoModel.Dispose()
at Dynamo.Models.DynamoModel.ShutDownCore(Boolean shutdownHost)
at Dynamo.Applications.Models.RevitDynamoModel.ShutDownCore(Boolean shutDownHost)
at Dynamo.Models.DynamoModel.ShutDown(Boolean shutdownHost)
at Dynamo.ViewModels.DynamoViewModel.PerformShutdownSequence(ShutdownParams shutdownParams)
at Dynamo.Controls.DynamoView.PerformShutdownSequenceOnViewModel()
at Dynamo.Controls.DynamoView.WindowClosing(Object sender, CancelEventArgs e)
at System.Windows.Window.OnClosing(CancelEventArgs e)
at System.Windows.Window.WmClose()
at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

capture

Here is a sum up report for versions i tried several times...

capture

(Fill in here)

if node only returns the shortest number of indexed items

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

1.0

Revit version

2015

Operating system

Windows 7

What did you do?

create an if statement where true pulls, list A and false pulls list b

What did you expect to see?

the full list to appear

What did you see instead?

(example.. if my true list has 0-6 indexes and my false list has 0-4 indexes, my result will only have 0-4 indexes)(some how it is cutting off any listed item beyond 0-4)
if_statement_issue_01

Curved objects facet for no reason in Revit geometry display

Dynamo version

1.0.0

Revit version

Revit 2016

Operating system

Win 10

What did you do?

Create any type of curved object: circle, ellipse etc

What did you expect to see?

Said curve, displayed in Revit without loss of fidelity, i.e. seamlessly curved

What did you see instead?

Said curve facets for no apparent reason. In Dynamo it looks fine. Also, if the dimensions of the curve are changed it occasionally corrects the problem in Revit?

Worth noting the following:

  1. The dimensions of the RVT file are in mm, the dimensions of the ellipse in the attached image are approx 4000mm x 8000mm so this isn't a Revit tolerance issue
  2. The Render Precision settings in Dynamo are set to the highest level
  3. Hardware acceleration is on in Revit

geometry display in revit poor

CurtainPanel.ByElement again - Issues with non-quadrilateral panels

Use case: A curtain wall that contains non-quadrilateral panels.
complexpanelshapesexample
CurtainPanel.ByElement will return as many panels as the product of U and V subdivisions of that curtain wall, regardless of how some cells may have been merged. This only becomes obvious when applying CurtainPanel.Boundaries to the list of panels. It looks like that node will then only return PolyCurves for the first cell of a "merged" panel and null for all other cells of that panel.
filteroutpartialpanels
Expected behaviour: Do not return any of the "subpanels", only those that actually register as panels in the Revit UI and schedules.

Get Family Parameter node improvement

Team,

cc: @ikeough @mjkkirschner @kronz (I am not sure who's working on this)
I think there is a clean way to return parameters that you could implement in Get Family Parameter node. I might be wrong on this, but it has worked for me so far.

This is the node that I am talking about: https://github.com/DynamoDS/DynamoRevit/blob/91f35d6e3762aa8b7da19043fde41e73e2a86f4d/src/Libraries/RevitNodesUI/RevitDropDown.cs

Please consider this instead:

Don't cast elements passed in as input into FamilyInstance or WallType etc. As a matter of fact just leave them be as Element .

Then you can get all parameters from an element and if that element is an instance you can also get its type parameters using this utility method:

private void AddElementParams(Element e)
        {
            foreach (Parameter p in e.Parameters)
            {
                if (!(p.StorageType == StorageType.None))
                {
                    AddDropDownItem(p);
                }
            }
            // if element can have type assigned it's safe to assume that it's an instance
            // and add type parameters to the list
            if (e.CanHaveTypeAssigned())
            {
                ElementType et = DocumentManager.Instance.CurrentDBDocument.GetElement(e.GetTypeId()) as ElementType;
                if (et != null)
                {
                    AddTypeParams(et);
                }
            }
        }

private void AddTypeParams(ElementType et)
        {
            foreach (Parameter p in et.Parameters)
            {
                if (p.StorageType == StorageType.None)
                    continue;

                AddDropDownItem(p);
            }
        }

As you can see I am making a simple check e.CanHaveTypeAssigned() to see if element has also element type parameters available and this seems to be just good enough.

This way, I can handle both, instances, as well as types being passed in as inputs and do away with type specific casting.

Please let me know if this helps. Here are some results:

paramlister

Is something more needed to edit/run Python Script node in Revit 2017?

Dynamo version:1.0.0.1180
Revit 2017
Windows 10

I was trying to edit a python script in a dynamo file and this error came up.
This is using the Python Script node.
Normally, we get an edit window that i can edit the python script.

Below is the error message I received:

Could not load file or assembly 'IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1' or one of its dependencies. The system cannot find the file specified.

at Dynamo.Python.IronPythonCompletionProvider..ctor()
at PythonNodeModelsWpf.ScriptEditorWindow..ctor(DynamoViewModel dynamoViewModel)
at PythonNodeModelsWpf.PythonNodeViewCustomization.EditScriptContent()
at PythonNodeModelsWpf.PythonNodeViewCustomization.view_MouseDown(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

image

Letting me know what I need to install, change, or updates would be much appreciated!

dynamo crashed when launching on a new file of revit2017

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

DynamoInstall0.9.2
(Which version of Dynamo are you using? Go to Help > About if you're not sure.)

Revit version

2017
(Which version of Revit are you using?)

Operating system

win 10
(e.g. Windows 7, Windows 8.1, etc)

What did you do?

tried to launch dynamo on a new revit file.
(Fill in here)

What did you expect to see?

(Fill in here)

What did you see instead?

HRESULT: [0x8876086C], Module: [SharpDX.Direct3D9], ApiCode: [D3DERR_INVALIDCALL/InvalidCall], Message: Unknown

at SharpDX.Result.CheckError()
at SharpDX.Direct3D9.Direct3DEx.CreateDeviceEx(Int32 adapter, DeviceType deviceType, IntPtr hFocusWindow, Int32 behaviorFlags, PresentParameters[] presentationParametersRef, DisplayModeEx[] fullscreenDisplayModeRef, DeviceEx returnedDeviceInterfaceOut)
at HelixToolkit.Wpf.SharpDX.DX11ImageSource.StartD3D()
at HelixToolkit.Wpf.SharpDX.DX11ImageSource..ctor()
at HelixToolkit.Wpf.SharpDX.DPFCanvas.StartD3D()
at HelixToolkit.Wpf.SharpDX.DPFCanvas.RenderTechniquesManagerPropertyChanged()
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at HelixToolkit.Wpf.SharpDX.Viewport3DX.RenderTechniquesManagerPropertyChanged()
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
at System.Windows.Data.BindingExpression.Activate(Object item)
at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
at System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
at MS.Internal.Data.DataBindEngine.Run(Object arg)
at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Interop.HwndTarget.OnResize()
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
capture

Cannot get geometry out of selected Revit element face (result of spline extrusion)

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

1.0.0.1180

Revit version

17.0.403.0
20160208_1515(x64)

Operating system

Windows 7

What did you do?

Created an extrusion from a profile that contains a spline and used Select Face or Select Faces nodes in Dynamo to get the geometry of the face resulting from that spline.

What did you expect to see?

I expected to see the surface appear in dynamo and perform geometric operations on it (offset surface, intersect with another, etc.)

What did you see instead?

The surface missing from Dynamo (showing null). However it seems to work when using mass elements (defined exactly the same).

elemfaceselect

I've attached the simple example in the picture (Revit file and Dynamo script)

ElemFaceSelect.zip

Wishlist: added functionality in groups

It is great to see the groups in the 0.8.1 builds. It helps a lot in large and complex graphics.

It would be interesting to add new nodes to an existing group (for example when moving the node "inside" the group, you get asked if you want to incorporate the node to the group). And in a similar way, to put nodes out of the group (for example when you select a node in a group and right click, you will have this option).

Select Element carries all data

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

Build 1.0.0.1180

Revit version

2016

Operating system

windows 10

What did you do?

Made a workflow that when user selects room, wall and floor finishes are created.

What did you expect to see?

If I open up workflow and select room, it creates walls and floors as expected. When I change selection though, I expect the same thing to happen to the new room.

What did you see instead?

When I select a new room, it causes all the information from the prior run to carry over, i.e even the room moves to the new selected room. I have nothing in my workflow to warrant the move.

here is a sample in which I have already selected room 6 and wall/ floor is created. I then go to select a new room and everything is carried over, including room 6.

workflow example

Element.SetParameterByName gives error on reopening script

I am working on a script which works fine but when i close the script and reload it I get an error on the Element.SetParameterByName node which worked before.

I can fix it by connecting a new string to the parametername input, run the script and then reconnect the original string. It seems to occur only when the parametername is "Start Join Cutback" or "End Join Cutback" Any ideas how to fix this, it makes it hard to use the script for other people.

Kind regards,

working fine before reopening
error on reload

Testing Revit Family type for equality against selected Family in project fails

Dynamo version

1.0.0

Revit version

Revit 2016

Operating system

Win 10

What did you do?

I have to test an array of adaptive component Family panels for equality against a particular type. The test is required as there are a number of different types of these components in the project: solid, window, etc and only the window components need to be identified/selected as they contain parameters which require updating (window opening width/height) from data stored in an Excel spreadsheet.

I created an imperative DesignScript definition which generates the test Family Type using the Family.Types query method and tests this type for equality against the family type of the selected components from the project.

What did you expect to see?

I expected that the equality test would return true when the test Family type and the extracted Family type from the component match (to then be able to update its parameters from the Excel data)

What did you see instead?

The equality test fails, despite even the object IDs being identical.

And if the objects IDs are used for equality, it works!?

The following example illustrates the behaviour I experienced in the DesignScript definition:

revit family eqality fails

Blanck Revit quickbar running Dynamo 1.0

(Which version of Dynamo are you using? Go to Help > About if you're not sure.)
dynamo 1.0.0

Revit version

Revit 2016 R2
(Which version of Revit are you using?)

Operating system

WINDOWS 10
(e.g. Windows 7, Windows 8.1, etc)

What did you do?

Hi, I have installed Dynamo 1.0 but when I launch that from Revit 2016 R2, Revit quickbar immediately becomes blank and all the icons seems invisible (if I pass over an icon I can see the description of the button, but I can’t see the icon!). If I switch the quickbar down, below the ribbon bar, I can see all the buttons running Dynamo, but I’d like to keep it on the top of the screen.
I have uninstalled Dynamo and everything is correct now: quickbar returns always visible.
I have checked my graphic card settings (NVIDIA high settings), my drivers are all updated.
I'm running Windows 10, Revit 2016 R2, NVIDIA GTX 950M.
Any other people found the same issue and reported that on dynamobim forum, but there is no answer.
Please, can you fix that problem?
Thanks

1.0 Version switcher showing wrong 0.9 version number

Dynamo version

1.0.0 stable (1.0.0.1180)

Operating system

Win 7

What did you do?

Use the version switcher in the Revit ribbon

What did you expect to see?

The correct version numbers

What did you see instead?

Dynamo 0.9.0 is displayed as Dynamo 0.9.1

versionswitcher
dynamo09

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.