查看: 2047|回复: 4

[分享] Python Scripting in Vasari 2.1 and Revit 2012

[复制链接]

发表于 2011-10-3 22:27:11 | 显示全部楼层 |阅读模式
It’s here! Daren Thomas has posted installers for RevitPythonShell for BOTH Revit 2012 and Vasari 2.1.
What does this mean? You, dear reader, can now script live in a Vasari session using Python. Behold!

高清视频下载地址:
http://dl.dbank.com/c0aihr3qlf
The samples I’m showing are things that I am not capable of cobbling together on my own . . . I’m NOT AT ALL a coding person. It’s actually my desperate hope that you will understand these concepts much better than I and do something cool with the tools. Keep an eye on Nathan Miller’s site, I’m sure he will have good stuff. My Create Surface script is a simplification of his supershapes script posted here. Thanks to Aki Hogge for everything else.

I have tried a bunch of times to get through “Hello World” in both full Visual Studio and VSTA for Revit and each time just failed miserably. I’ve had much more success with this tool and can see a way to actually progressing in my API education. So if you have tried and failed with the Revit API in the past, give this a shot. Here’s the text version of how to get started:
RevitPythonShell for Vasari in 5 minutes:
Run Vasari at least once on the computer in question
Install IronPython: http://ironpython.net/
Install RevitPythonShell:
http://code.google.com/p/revitpy ... 2.1.exe#makechanges
Download some starter samples from here.
Open Vasari >Addins tab>RevitPythonShell>Configure . . .>
In Search Paths tab, add the Lib folder in your IronPython installation (ex, C:\Program Files (x86)\IronPython 2.7\Lib), this is for autocomplete
In Commands tab>Add> select the attached pySamples
Save and restart Vasari. Play with samples.

All the samples run in Mass.rfa files, GoalSeeker uses the Goalseeker example files. It all works in either Vasari or Revit.

To monkey with the scripts live, just open them in an editor (notepad works, I’m sure there are way better ones) make changes, save and then run again in Vasari.

There’s no official SDK or documentation for the Vasari API, but it is essentially a slimmed down version of the Revit API, with detail model elements and such removed.
所需文件统一打包在: RevitPythonShell.rar (3.68 MB, 下载次数: 439)
回复

使用道具 举报

 楼主| 发表于 2011-10-3 22:28:29 | 显示全部楼层
哎~~又忘记分类了。抱歉,麻烦版主移一下!!!实在抱歉!!

点评

已经复制过去一份,感谢wudingmao1的分享。  发表于 2011-10-3 23:16

评分

1

查看全部评分

回复 支持 反对

使用道具 举报

发表于 2011-10-3 23:17:02 | 显示全部楼层
好插件,支持好帖。有空研究下和大家一起讨论技巧。
回复 支持 反对

使用道具 举报

发表于 2011-10-3 23:20:10 | 显示全部楼层
这插件干嘛用的?
回复 支持 反对

使用道具 举报

发表于 2011-10-4 10:40:31 | 显示全部楼层
有点晕!!!!!!!!!!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则