External application on PC without RPS

105 views
Skip to first unread message

duran...@gmail.com

unread,
Sep 4, 2019, 4:38:23 AM9/4/19
to RevitPythonShell
Hi everyone,

I have managed to create several apps for Revit and want to run them on computers without instance or RevitPythonShell. I have set up largeImage and small Image (would however like to be able to add ToolTip and longDescription without startup script but as an individual DLL). I also created Installer with InnoSetup. However, when I install it to a computer without RPS being installed for that particulare Revit version I get following Exception message:

exception.jpg























It is being easily solved when I install RPS and deinstall it, it preserves some specific file on specific location which enables me further more to use my apps without RPS. Any ideas if I can overcome this by including additional files besides "Output"  file from RPS deployment and .addin file within my instaler?

Also, is it possible to utilize tooltip and longDescription by using XML manifest deployment:

<?xml version="1.0" encoding="utf-8" ?>
<RpsAddin>
  <RibbonPanel text="Walter Tiny Help Tools">
      <!-- the script is always searched relative to the location of the RpsAddin xml file -->
      <PushButton text="Point Cloud Visibility"  largeImage="PC.png" smallImage="PC1.png" src="PC.py"/>
  </RibbonPanel>
</RpsAddin>


Thanks everyone in advance

duran...@gmail.com

unread,
Sep 4, 2019, 7:55:14 AM9/4/19
to RevitPythonShell


Untitled.png


This simple trick did the thing...sorry for bothering you guys.

However I am still interested in  tooltip and longDescription by using XML manifest deployment only...Is this possible?

Callum

unread,
Sep 5, 2019, 5:56:17 PM9/5/19
to RevitPythonShell

ToolTip and LongDescription is only available when initialized as a Startup script as far as I know. But this also enables a host of other Ribbon upgrades aswell - here is our current suite, all built on RPS and initialized via a Startup script:


Ribbon.png

Irnes Duran

unread,
Sep 7, 2019, 3:49:45 AM9/7/19
to revitpyt...@googlegroups.com
I fugured it will be like this. Thank  you very much Callum.



Duran Irnes - M.Arh.-dipl.ing.arh.


--
You received this message because you are subscribed to a topic in the Google Groups "RevitPythonShell" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/revitpythonshell/tzTbmNRQicg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to revitpythonshe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/revitpythonshell/8c0c454d-7f4d-40ff-8feb-94aab643197c%40googlegroups.com.

davidt...@gmail.com

unread,
Jun 18, 2020, 7:08:30 AM6/18/20
to RevitPythonShell
Callum, I came across your post using a Startup script to create your own menu.  That's exactly what I've been working on trying to figure out the last few days.  Daren has been a tremendous help getting me going, now I just need to take it to the next level.  I've tried finding examples of how this is done, but not having any luck.  Would you be willing to share some code snippets of how you accomplished this?  Any help would be appreciated.  If not, I understand.  Looks pretty cool though!

Callum

unread,
Jun 21, 2020, 5:20:29 PM6/21/20
to RevitPythonShell
Hi David, Im keen to help. 

There are a few finniky steps to achieving this, but Ive had a read through Darens partially completed book on the matter and it covers everything thats needed (look specifically for 'startup script'):

But as there are a handful of files that all need to be in different places, its probably wirth you having a go (whcih it sounds like have) and reporting any specific error messages youre getting, Here is the Startup Script example that covers pretty much everything you can do on the Ribbon:

Feel free to work though the steps in Darens book and let us know where you get to!

David Burwell

unread,
Jun 22, 2020, 12:52:49 PM6/22/20
to revitpyt...@googlegroups.com

Callum, thanks for the reply.  All the stuff you suggested I’ve been through and through.  Here was the problem:

 

I wanted to make my own Tab using the startup script, not have it go into the Addins tab.  Every example just had this:

 

    panel = __uiControlledApplication__.CreateRibbonPanel("New Ribbon Panel")

 

 

After digging in the Revit API docs, I fumbled through it and finally got it to work like this:

 

    def create_ribbon_panel():

        mytab = __uiControlledApplication__.CreateRibbontab("New Tab")    

        panel = __uiControlledApplication__.CreateRibbonPanel(“New Tab”, "New Ribbon Panel")

 

Note: the highlighted line above being the key to what I was looking for.  Was that documented somewhere that I missed?

 

That’s what I was asking, is that how you did yours (to get it into its own tab)?  Are you installing RPS on each computer and pointing to a startup script, or are you creating an installer (Exe file) that has an RPSAddIn Manifest file that points to the startup script?

 

Just trying to figure out which is the common/best practice (if any).

 

Thanks once again,

 

Dave

--

You received this message because you are subscribed to a topic in the Google Groups "RevitPythonShell" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/revitpythonshell/tzTbmNRQicg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to revitpythonshe...@googlegroups.com.

David Burwell

unread,
Jun 22, 2020, 3:02:41 PM6/22/20
to revitpyt...@googlegroups.com

Callum,

 

I have an addin that works fine.  I also have a startup script that creates my own menu tab (defined in Configure RevitPythonShell, under Startup Script) and that works great also.

 

What I’m trying to do, with no success, is create an Executable file (using Inno Setup Compiler, similar to the way I made the addin) that references a Startup Script to define of my buttons.

 

I think that is what this portion is saying, correct?

 

https://daren-thomas.gitbooks.io/scripting-autodesk-revit-with-revitpythonshell/content/deploying_rpsaddins/creating_the_rpsaddin_manifest.html

 

 

I can’t seem to understand what he wants the contents of Helloworld.py and good_morning_world.py to be.  I assume the good_morning_world.py is the file that defines all of my buttons (startup script), and the Helloworld.py is what is defined to create the Class in the DLL.  Do you know, or have an example, of how these two files relate and what their contents are?  I think that’s where I’m getting stuck, unless I’m misunderstanding what it can actually do.

 

Any help pushing me forward would be greatly appreciated.  My end goal is to have an EXE to load on all end users computers that will give them the menu tab without installing RPS on their computers.

 

Am I making any sense??? Thanks again!!!

 

From: <revitpyt...@googlegroups.com> on behalf of Callum <his...@gmail.com>
Reply-To: <revitpyt...@googlegroups.com>
Date: Sunday, June 21, 2020 at 5:20 PM
To: RevitPythonShell <revitpyt...@googlegroups.com>
Subject: [revitpythonshell] Re: External application on PC without RPS

 

Hi David, Im keen to help. 

--

Callum

unread,
Jun 22, 2020, 4:49:34 PM6/22/20
to revitpyt...@googlegroups.com
Morning David - youre making perfect sense and the journey youre on is a familiar one!

Apologies for the elusive forum post too, telling someone to read the API documentation is more frustrating than helpful - but now I think I can see where youre up to. If you can, could you bullet point all the steps that are ambiguous / incomplete in Darens Book to help him make it better (ie. the line you have highlighted in yellow)?

Regarding the Startup Script and EXE file - Ill tell you how Ive built it at Assemble to see if thats what you are trying to achieve:

- Ive written a few different scripts that each contain a UI and do different things - essentially a range of stand-alone addins
- Using a startup script, I build a Ribbon Panel and place a Ribbon Button that run each of these scripts. These also have Icons, and Short Descriptions etc
- Using Inno, Ive made an .exe installer that copies all the scripts, support dlls, addin manifests, icons into the correct folders. 

How does that sound? Note: Using this process, there is no need to have users install RPS on their computers, the support dll files seem to handle this. Once you have that downpacked, you can move on to the next-level advances which really streamline things!

- Ive written a 'deploy.py' file that bumps the addin suite version, writes the inno file, copies the python files, and compiles them all into a installer with a single click. Really important to get this process beautiful, otherwise as the developer you will begrudge every time someone asks for a feature or needs a bug fixed (and the more fun you have, the more there will be!)
- Using the Inno installer, Ive placed a shortcut in each users startup folder so when they start their computers, the addin re-installs itself on their machines. Great for bug fixing and adding features, without getting users to ever have to install anything again. Inspired by Google Chrome

Now to answer your questions above:

- The Screenshot you have posted is of the 'deployment XML file' (note: mine doesnt need the 'File src' line). 
- In this instance, the 'good_morning_world.py' is a startup script that sets up the Ribbon and Buttons, pointing to all your python addins - and nothing more. 
- Place this deployment file in a folder with 'good_morning_world.py', then from the RPS ribbon button, run 'Deploy' and point to this deployment file
- The result will be a subfolder called 'Output_ good_morning_world' with a file inside called 'good_morning_world.dll'
- This dll file is what the whole process has been about (you may have been expecting it to be an exe file) - install this onto users machines using inno, then point to it from your Revit Addin manifest (the file ending in '.addin')

Let me know how this sounds, and what parts you would like me to extrapolate on!






--
his dirt removes my blindness,
his pain becomes my peace.

David Burwell

unread,
Jun 23, 2020, 6:39:54 AM6/23/20
to revitpyt...@googlegroups.com

Callum, good morning to you – but wherever you are, it may be goodnight!

 

I’ll process this info (which most of it makes perfect sense and is the direction I’m going) and let you know how it goes.  Some of the stuff you’ve done to automate is interesting, and to be honest, probably above my pay grade right now.  Baby steps!

 

Thanks again for all of your help, it’s greatly appreciated!

 

Dave

cid:172ddb1ce3a4ce8e91

Reply all
Reply to author
Forward
0 new messages