Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

just an idea: __rps__ #29

Open
eirannejad opened this issue Aug 17, 2015 · 2 comments
Open

just an idea: __rps__ #29

eirannejad opened this issue Aug 17, 2015 · 2 comments

Comments

@eirannejad
Copy link
Contributor

defining __rps__ variable (similar to __revit__ ) to access RevitPythonShell settings and functionality.

@daren-thomas
Copy link
Member

Which settings and which functionality specifically?

The variables can be accessed through __vars__. Changes are persisted
between Revit sessions. What functionality exactly would you like?

On Mon, Aug 17, 2015 at 7:51 PM, Ehsan Iran-Nejad [email protected]
wrote:

define rps variable (similar to revit) to access rps settings and
functionality.


Reply to this email directly or view it on GitHub
#29
.

@eirannejad
Copy link
Contributor Author

Honestly I didn't have anything specific in mind. I was thinking it'd be cool if we could refer to RPS settings in a __rps__.Settings.GetExternalScripts() fashion. Maybe more useful for possible future developments.

Or maybe even the RPS internal classes. e.g. __rps__.CommandLoaderBase. In one of my scripts I'm using this class definition to create external commands for Revit just as RPS does.

def findRPSCommandLoader( self ):
   for loadedAssembly in AppDomain.CurrentDomain.GetAssemblies():
      if "RevitPythonShell" in loadedAssembly.FullName:
         self.rpsCommandLoader = loadedAssembly.GetType("RevitPythonShell.CommandLoaderBase")
         self.rps = loadedAssembly

That would have been much simpler with an __rps__:

def getRPSCommandLoader( self ):
   self.rpsCommandLoader = __rps__.CommandLoaderBase

Again just an idea :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants