RpsAddIn manifest

135 views
Skip to first unread message

Coen Claus

unread,
Mar 15, 2018, 10:40:19 AM3/15/18
to RevitPythonShell
After reading and following this tutorial I was wondering the following;

Is it possible to create small pushbuttons through the xml file and if the icon images can be changed?
The tutorial gives examples for normal sized Pushbuttons and Splitbuttons. But I can't seem to find documentation on any other type of buttons.

I know it can be done through the startupscript in RevitPythonShell.
But I've created a setup.exe I want to distribute without the default Python button icon. 

I want the Add-Ins for people to work who don't have RevitPythonShell installed with custom icon images.

Thanks in advance. 

Daren Thomas

unread,
Mar 19, 2018, 10:42:06 AM3/19/18
to revitpyt...@googlegroups.com
Dear Claus,

I just checked and it seems you can just create PushButtons and SplitButtons. When creating PushButtons, you can specify an icon to use using the `smallImage` and the `largeImage` parameters that can be set to the full path of a 16x16 or 32x32 png file respectively.

Using the startupscript really gives you the full power so you should use that. Check here for information on how to add a startupscript to your RpsAddin xml file: https://daren-thomas.gitbooks.io/scripting-autodesk-revit-with-revitpythonshell/content/deploying_rpsaddins/creating_the_rpsaddin_manifest.html

Something like this:

<?xml version="1.0" encoding="utf-8" ?>
<RpsAddin>
  <StartupScript src="good_morning_world.py"/>
  <File src="helloworld.py" />
</RpsAddin>
Given this possibility, I don't see a big need to add more functionality to the rpsaddin manifest. Would this work for you?

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.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Coen Claus

unread,
Mar 23, 2018, 3:35:06 AM3/23/18
to RevitPythonShell
Thanks! I used the following XML for deploying a RpsAddIn;

<?xml version="1.0" encoding="utf-8" ?>
<RpsAddin>
  <RibbonPanel text="Assembly Code Filter">
    <!-- the script is always searched relative to the location of the RpsAddin xml file -->
    <PushButton text="Filter By Assembly Code" src="assembly_code_filter.py" largeImage="U:\\09. Python scripts\\assembly_code_filter\\some_icon.png" />
  </RibbonPanel>
</RpsAddin>

I am using InnoSetup to create an installer to deploy the Revit Add-Ins. Startupscript is very useful too but as far as I know I can't reference the script more than once. 


Op donderdag 15 maart 2018 15:40:19 UTC+1 schreef Coen Claus:

Daren Thomas

unread,
Mar 23, 2018, 5:23:40 AM3/23/18
to revitpyt...@googlegroups.com
Hi Claus,

I'm not sure I understand what you mean?

- are you asking if you can reference a script more than once?
  - where? as the startup script AND as a pushbutton script?
- are you asking HOW to reference a startup script?
- or are you asking something else?

Best,
Daren

--
Message has been deleted

Daren Thomas

unread,
Mar 26, 2018, 5:34:04 AM3/26/18
to revitpyt...@googlegroups.com
This sounds like two separate issues. OK. SO. You can deploy your startup script with the RpsAddin - I mentioned how to do that above. That should solve your UI issues.

As for your second problem - I'm really surprised. I'd love to see an actual error message - "it says the script is already being in use" is not quite enough to help you debug the problem. Running a startup script does not "block" it at all - they are only read, never written to.

Best,
Daren

On Fri, Mar 23, 2018 at 10:29 AM, Coen Claus <coen...@gmail.com> wrote:

- are you asking if you can reference a script more than once?
I'm testing the scripts I'm making on different systems in the company where I work. I installed RevitPythonShell on several people's machines. I used the startupscript to create the interface on the RibbonPanel. Only when I refer to the same startupscript from the server to different systems it says the script is already being in use. I hope I explained it clear. That's why I want to create an installer.




Op vrijdag 23 maart 2018 10:23:40 UTC+1 schreef Daren Thomas:
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.
Message has been deleted

Callum

unread,
Mar 27, 2018, 3:44:37 PM3/27/18
to RevitPythonShell
Hi Coen, 

I can confirm what Daren is saying too, we have achieved multiple sized buttons, in their own Ribbon tab, with their own icons all from a startup script. And wrapped it all in an install-able inno exe file. 

Best way to build it its to have individual python scripts imported into your startup script, so if you need to bug test / update you just edit the python script without restarting Revit.
Reply all
Reply to author
Forward
0 new messages