RevitPythonShell for Revit 2017

872 views
Skip to first unread message

Daren Thomas

unread,
Jun 22, 2016, 9:41:23 AM6/22/16
to RevitPythonShell
I have just published a version of RPS for Revit 2017. I have marked it as a "Pre-Release", since it probably needs some testing. Give it a spin if you like and post your results!

I would like to thank @PMoureu (https://github.com/PMoureu) for adding some fixes to error handling and file dialogs!

Tran Ngoc Hien

unread,
Jun 22, 2016, 12:43:52 PM6/22/16
to RevitPythonShell
Thank Daren , I will test this with my add-in. If have any issue i will notice you.

Vào 20:41:23 UTC+7 Thứ Tư, ngày 22 tháng 6 năm 2016, Daren Thomas đã viết:

prmo...@gmail.com

unread,
Jun 22, 2016, 4:00:29 PM6/22/16
to RevitPythonShell
So far so good
tests (with win7) : install, transactions, adding scripts or global variables, Ipudaters, forms  ==> OK

The uninstaller doesn't remove the .addin file but... nobody needs that :p

Tran Ngoc Hien

unread,
Jun 22, 2016, 4:16:31 PM6/22/16
to RevitPythonShell, prmo...@gmail.com
Hi all !

Yes, it can run very good. But you can test deploy add-in with RPS, and then run start add-in with revit 2017, the error happen like i posted in topic before.


Can you check it out. Thanks

Vào 03:00:29 UTC+7 Thứ Năm, ngày 23 tháng 6 năm 2016, prmo...@gmail.com đã viết:

Daren Thomas

unread,
Jun 23, 2016, 4:51:26 AM6/23/16
to RevitPythonShell, prmo...@gmail.com
Hi Tran,


Thanks for giving the other one a spin and reporting the issue!

Best,
Daren

Tran Ngoc Hien

unread,
Jun 23, 2016, 6:01:18 AM6/23/16
to RevitPythonShell, prmo...@gmail.com
Thank you very much. Yes, i will test this with my add-in and some function and then report to you.

Vào 15:51:26 UTC+7 Thứ Năm, ngày 23 tháng 6 năm 2016, Daren Thomas đã viết:

Tran Ngoc Hien

unread,
Jun 23, 2016, 9:32:56 AM6/23/16
to RevitPythonShell, prmo...@gmail.com


Hi @Daren !

The error still happend when i start a revit. The add-in run after that is fine, but always get error when revit start.

Can you check again ?



Vào 15:51:26 UTC+7 Thứ Năm, ngày 23 tháng 6 năm 2016, Daren Thomas đã viết:

Daren Thomas

unread,
Jun 23, 2016, 9:47:17 AM6/23/16
to revitpyt...@googlegroups.com
Did you re-create the RpsAddin after updating? The RpsRuntime.dll file changed - you will need to make sure you are only using the newest version (in all your addins!)

--
You received this message because you are subscribed to the Google Groups "RevitPythonShell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to revitpythonshe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tran Ngoc Hien

unread,
Jun 23, 2016, 11:04:02 AM6/23/16
to RevitPythonShell
Hi @Daren !

I was install new revit python shell, and the deploy add-in again with RPS.but the error still happened.

Thanks !

Vào 20:47:17 UTC+7 Thứ Năm, ngày 23 tháng 6 năm 2016, Daren Thomas đã viết:

Tran Ngoc Hien

unread,
Jun 23, 2016, 11:06:21 AM6/23/16
to RevitPythonShell
You can check the the revit python shell is a new file now??

Thanks !

Vào 20:47:17 UTC+7 Thứ Năm, ngày 23 tháng 6 năm 2016, Daren Thomas đã viết:

Tran Ngoc Hien

unread,
Jun 23, 2016, 11:18:45 AM6/23/16
to RevitPythonShell
Hi @Daren !

I try remove old revit python shell 2017 first, and the install new version (not overwrite as the first time i do), this time we have error about String reference as picture below.



Vào 20:47:17 UTC+7 Thứ Năm, ngày 23 tháng 6 năm 2016, Daren Thomas đã viết:

Daren Thomas

unread,
Jun 24, 2016, 5:54:15 AM6/24/16
to RevitPythonShell
Please try these two things:

- Can you please make sure no other addins are being loaded? (you can rename all the .addin files to .addin.bak temporarily) Just the RpsAddin that is causing the error. Does it work now?
- Does the startup script work when set as the RPS startup script? (I think there might be a problem on your side...)

Otherwise, please create a (minimal!) test case (python script, RpsAddin manifest, Revit addin manifest) that reproduces the problem because on my machine it seems to be working... So I can't really help until I have a case that doesn't work...

Best,
Daren

Tran Ngoc Hien

unread,
Jun 24, 2016, 6:35:35 AM6/24/16
to RevitPythonShell
Hi @Daren !

- I just have revit python shell add-in and one add-in for testing.

- Start up script still work as well. Everything is ok when i deploy my add-in in revit 2016. 

- I will make one mini add-in to test again in Revit 2017

Hope i can find something. Thanks

Vào 16:54:15 UTC+7 Thứ Sáu, ngày 24 tháng 6 năm 2016, Daren Thomas đã viết:

Daren Thomas

unread,
Jun 24, 2016, 7:57:53 AM6/24/16
to revitpyt...@googlegroups.com
Hi Tran,

for testing the deployed addin, remove RPS first. See if that helps!

Best,
Daren

Tran Ngoc Hien

unread,
Jun 24, 2016, 9:33:50 AM6/24/16
to RevitPythonShell
Hi @Daren!

- I have just tested my add-in very carefully, but the error still happened. I tested with small add-in, the add-in run as well in revit, but always get error when revit 2017 start. I remove RPS before test with my add-in, the result is same.

- You can check the setup file is a newest file ?

Thanks.

Vào 18:57:53 UTC+7 Thứ Sáu, ngày 24 tháng 6 năm 2016, Daren Thomas đã viết:

Tran Ngoc Hien

unread,
Jun 24, 2016, 9:38:39 AM6/24/16
to RevitPythonShell
The error as below, but the add-in tested work as well.




Vào 20:33:50 UTC+7 Thứ Sáu, ngày 24 tháng 6 năm 2016, Tran Ngoc Hien đã viết:

Daren Thomas

unread,
Jun 27, 2016, 3:48:05 AM6/27/16
to revitpyt...@googlegroups.com
can you please send me a script that reproduces this problem?

Tran Ngoc Hien

unread,
Jun 27, 2016, 9:28:31 AM6/27/16
to RevitPythonShell
Hi @Daren

I attached the file for you to deploy add-in by RPS. You will see i just test with small code for this.

Hope you find a reason why i get error. If not could you please check again the install file which you uploaded is a newest file.

Thanks

Vào 14:48:05 UTC+7 Thứ Hai, ngày 27 tháng 6 năm 2016, Daren Thomas đã viết:
test.zip

Daren Thomas

unread,
Jun 29, 2016, 5:15:21 AM6/29/16
to RevitPythonShell
Hi @Tran,

Thank you for finding this bug! I totally misunderstood you here - I was testing the startup script functionality, when your addin doesn't have a startup script. I have just published a new release & installer. It should work now!

BTW: I noticed in your help script, that you hard-coded the installation directory of your script. You could also make use of the `__file__` variable... (os.path.dirname comes in handy)

Also, is Tran your first name? (I've seen it as a surname, so I'm not sure and you never add a signature to your posts, so I don't really know what to call you?)

Best, Daren

Tran Ngoc Hien

unread,
Jun 29, 2016, 9:47:14 AM6/29/16
to RevitPythonShell
Hi @Daren !

The new setup file is work fine. Thank you for helping, i'm just a newbie in python but I really like python and
revit python shell as well, it's help me test and run my code very fast.
I will continue to test new setup file for revit python shell 2017 then report to you.

p/s : My name is Hien so Hien is my first name, and Tran is my surname ^_^.

Thanks !

Vào 16:15:21 UTC+7 Thứ Tư, ngày 29 tháng 6 năm 2016, Daren Thomas đã viết:

Daren Thomas

unread,
Jun 29, 2016, 9:54:10 AM6/29/16
to RevitPythonShell
Hi @Hien !

Glad we could get it working. Finally!!

Have a nice day,

Daren

juancalvo...@gmail.com

unread,
Jul 5, 2016, 6:22:40 AM7/5/16
to RevitPythonShell
Hi,

First of all, thanks for all this work, is amazing. 

Then, I will like to know if it's possible, how to install RevitPythonForRevit2017. I have downloaded the zip folder from the GitHub link, but I don't see any instructions. Also I only see a installer for Revit 2016. Sorry if I'm missing something obvious. I'm new to programming with Python. 

Thanks! Have a nice day!

Juan.

Daren Thomas

unread,
Jul 5, 2016, 7:05:30 AM7/5/16
to revitpyt...@googlegroups.com
Hi Juan,

You are right: The README.md file did not link to the release! Thank you for pointing that out :) I have fixed it.


Best,
Daren

--

Juan E. Calvo Ferrándiz

unread,
Jul 5, 2016, 9:50:46 AM7/5/16
to RevitPythonShell
Great. Thanks for your quick answer. I have installed the 2017 .exe sucessfully. The issue it's that now I got doubts of what I need to do with de zip folder that I downloaded from your GItHub link. Thanks.

Daren Thomas

unread,
Jul 5, 2016, 11:09:02 AM7/5/16
to revitpyt...@googlegroups.com
just delete it, i guess? the installer installs everything you need... the zip just contains the source.

Juan E. Calvo Ferrándiz

unread,
Jul 5, 2016, 11:37:09 AM7/5/16
to RevitPythonShell
Yep. Thanks. As you can see my programming knowledge are quite low at this moment. I understand that what I should have done is downloading the source code and compiling it myself. I want to install RevitLookup as you recommend. ( I have already install IronPython, RevitPythonShell, Open Revit and hook up the IronPython Library and install the 2017 SDK). How I compile RevitLookup? Thanks for your time and please tell me if I'm too tiresome.;) Thank you. Regards.

Daren Thomas

unread,
Jul 5, 2016, 12:04:26 PM7/5/16
to revitpyt...@googlegroups.com
you will need visual studio to compile revitlookup. i think you should ask jeremy tammik for instructions as he is the maintainer...

Juan E. Calvo Ferrándiz

unread,
Jul 5, 2016, 12:18:10 PM7/5/16
to RevitPythonShell
Ok. Thanks again. I found this link that apparently works:


Although, I will try to contact with Jeremy Tammik.

Regards.
To unsubscribe from this group and stop receiving emails from it, send an email to revitpythonshell+unsubscribe@googlegroups.com.

Callum

unread,
Oct 9, 2016, 3:44:02 PM10/9/16
to RevitPythonShell
Hi guys, I have a few questions on deploying for R2017 that I think is most relevant for this thread:

- Should addins deployed from R2016 be able to run in R2017? When I deploy from R2015 or R2016, they throw the error that @Hien gets above when I start R2017.

Daren Thomas

unread,
Oct 10, 2016, 3:54:54 AM10/10/16
to revitpyt...@googlegroups.com
Hi Callum,

I really don't know. Do you have the capacity to test this?

Best,
Daren

To unsubscribe from this group and stop receiving emails from it, send an email to revitpythonshell+unsubscribe@googlegroups.com.

Callum

unread,
Oct 11, 2016, 6:05:42 PM10/11/16
to RevitPythonShell
Sorry that post wasnt too clear - yes I have tried this and have found that addins deployed from R2015 and R2016 are not able to run in R2017. 

When I deploy from R2015 or R2016, they throw the error that @Hien gets above when I start R2017.

Daren Thomas

unread,
Oct 12, 2016, 3:44:23 AM10/12/16
to revitpyt...@googlegroups.com
Hm... this could be exciting. I wonder if we can set up RPS 2017 with a newer version of IronPython? I know, having to write multiple versions of your addins is a pain. I've been there. But it is my experience that most users move on to the new version of Revit pretty quickly...

To unsubscribe from this group and stop receiving emails from it, send an email to revitpythonshell+unsubscribe@googlegroups.com.

Callum

unread,
Oct 13, 2016, 9:15:57 PM10/13/16
to RevitPythonShell
Ooooh might be time for a bigger change eh Darren? Im curious about a few things:

- What are the advantages of a newer version of Iron Python? 
- Would this upgrade to Python 3? 
- Can we deploy from R2017 and still have the addins work as far back as R2015?

Sounds like youre a fan of it though, projects that Darren enjoy, we all benefit from!

Callum

unread,
Oct 20, 2016, 5:33:07 PM10/20/16
to RevitPythonShell
Hi Darren, any more thoughts on this? 

Might there be an updated RPS 2015 and 2016 version that can deploy to R2017 coming soon?

Daren Thomas

unread,
Oct 21, 2016, 6:01:23 AM10/21/16
to revitpyt...@googlegroups.com
Hi Callum,

I have been really busy with other stuff - RPS is waaay down on my list of priorities right now as I am not working with BIM at all anymore.

So, no, I will probably not update RPS 2015 and 2016 to deploy to RPS 2017. I will probably end up dropping support for older Revit versions (2018 is coming soon I guess?) instead.

What are your thoughts on how long old Revit versions should be supported?

If we can move to a newer IronPython with RPS 2017, would it really matter that the 2015 and 2016 branches be neglected?

This would be a really good moment to explain how having the feature "deploy to R2017" would benefit you, Callum. I'm afraid I am too far removed from the use case to make a good decision on that. What are your inputs?

Love,
Daren

To unsubscribe from this group and stop receiving emails from it, send an email to revitpythonshell+unsubscribe@googlegroups.com.

Callum

unread,
Oct 23, 2016, 11:24:06 PM10/23/16
to RevitPythonShell
By 'deploy to R2017' I was meaning the standard deploy workflow to convert RPS scripts to ribbon commands. I hadnt been able to get R2016 to deploy to R2017, even though R2015 could deploy to R2016. But nevermind, I think Im making this more complicated that it needs to be - Daren Im not wanting to request things that make things more difficult!

Lets ignore my case until Ive properly tested things on R2017. Ill test if RPS scripts can be deployed from R2017 to earlier Revit versions, and open a different thread if necessary.

Daren Thomas

unread,
Oct 24, 2016, 7:17:50 AM10/24/16
to revitpyt...@googlegroups.com
I wonder if we could create a "build system" with a startup script, that would deploy from each revit when accessed. the mechanism could be like the web server example and it could just automate the deploy stuff. that way, you could write a make / installer script that starts each version of revit and kicks off the deploy for each version and create plugins per version? would that work for you?

To unsubscribe from this group and stop receiving emails from it, send an email to revitpythonshell+unsubscribe@googlegroups.com.

Callum

unread,
Oct 30, 2016, 6:02:57 PM10/30/16
to RevitPythonShell
Hi Darren, thats a clever deployment strategy - although might be a bit more than necessary as addins deployed from R2015 work on R2014 and R2016 aswell (which is great, a single installer for all Revit versions)

R2017 seems to be the only one that needs to be deployed specifically, but Ill do some testing to confirm this. If its backwards compatible then thats a great bonus - but not worth your time to make that happen Daren, your deployment strategy would be something I could build to cover all Revit versions.

Callum

unread,
Nov 6, 2016, 4:12:11 PM11/6/16
to RevitPythonShell
To clarify this post for anyone else who comes across it:

When you need to deploy to multiple different version of Revit, Ive found it easiest to use the latest version of RPS and deploy to previous versions, patching the few API differences. Ive successfully done this with 10 various addins that run fine on R2014,15,16 with only minor code amendments catching the API evolution. 

joanna...@gmail.com

unread,
Apr 24, 2018, 2:05:03 AM4/24/18
to RevitPythonShell
Hi Daren, 

1st Time to try
Im On Revit 2017.2, and I am trying to Install pyRevitSetup-v4.5, Problem my windows is not accepting it, I am Architect By Profession,
I want to learn about this coding in my Revit Operations.

Thanks!


On Wednesday, June 22, 2016 at 9:41:23 PM UTC+8, Daren Thomas wrote:
I have just published a version of RPS for Revit 2017. I have marked it as a "Pre-Release", since it probably needs some testing. Give it a spin if you like and post your results!

I would like to thank @PMoureu (https://github.com/PMoureu) for adding some fixes to error handling and file dialogs!

Daren Thomas

unread,
Apr 24, 2018, 5:09:26 AM4/24/18
to revitpyt...@googlegroups.com
Hi Joanna,

pyRevitSetup-v4.5 is not the same as RevitPythonShell. I'm afraid I don't really no much about pyRevit - check Ehsan Iran-Nejad's blog here: http://eirannejad.github.io/pyRevit/ for more information on pyRevit.


The link above is for Revit 2017 - but I think the newest version of RPS is made for Revit 2018.

Best,
Daren

--
You received this message because you are subscribed to the Google Groups "RevitPythonShell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to revitpythonshell+unsubscribe@googlegroups.com.

khang.ng...@gmail.com

unread,
May 18, 2018, 3:02:37 AM5/18/18
to RevitPythonShell
Hi All,

I am learning Python and I would like to develop my knowledge to aplly Python for Revit. It will be good if I can develop addin for some automation tasks Revit. 

Happy to connect and learn from you all!

Khang Nguyen
Reply all
Reply to author
Forward
0 new messages