简体   繁体   中英

How do I get my dynamo code into visual studio?

I currently have a dynamo project with a useful macro that I use in Revit, however, I can only run this if I have dynamo and Revit open at the same time.

I would like to add this macro onto my ribbon tab within Revit but cannot do this while the macro is built in dynamo.

Is there a way I can either:

Export the macro I have made inside dynamo into a .dll? Open it up in visual studio and build the code in there? View the code in dynamo? Many thanks,

Dan

There are a number of ways to achieve this.

Most of them involve several different translation steps.

All of them would require you to access, extract and save the Python source code in an external text file to begin with.

Not being very familiar with the Dynamo and Python side of things, coming from the C# .NET add-in side, I would suggest trying to integrate your code into the pyRevit IronPython script library once you have it in hand:

http://thebuildingcoder.typepad.com/blog/2016/04/the-pyrevit-ironpython-script-library.html

Afaik, that is easy and provides exactly what you are asking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM