pyrevitlabs / pyRevit

Rapid Application Development (RAD) Environment for Autodesk Revit®
http://wiki.pyrevitlabs.io
GNU General Public License v3.0
1.3k stars 333 forks source link

Running own Extension on Server #1904

Closed CrossArchitecture closed 1 year ago

CrossArchitecture commented 1 year ago

Hello everyone, I have developed an extension which I am currently using on my local machine. https://github.com/CrossArchitecture/cross Everything works without any problems, but I would like to use the extension in my office and share it with my colleagues. They all access Revit via a server at our office. I have my extension as a repo here on GitHub and so that I can use it on my local computer I use the extension.json file.

{
    "extensions": [
        {
            "builtin": "False",
            "type": "extension",
            "rocket_mode_compatible": "False",
            "name": "PyRevitPlus",
            "description": "Extensions for PyRevit",
            "author": "Gui Talarico",
            "author_profile": "https://github.com/gtalarico",
            "url": "https://github.com/gtalarico/pyrevitplus.git",
            "website": "https://github.com/gtalarico/pyrevitplus",
            "image": "",
            "dependencies": []
        },
        {
            "builtin": "False",
            "type": "extension",
            "rocket_mode_compatible": "True",
            "name": "PyRevitMEP",
            "description": "MEP extension for PyRevit",
            "author": "Cyril Waechter",
            "author_profile": "https://github.com/CyrilWaechter",
            "url": "https://github.com/CyrilWaechter/pyRevitMEP.git",
            "website": "http://pythoncvc.net/?page_id=123",
            "image": "",
            "dependencies": []
        },
        {
            "builtin": "False",
            "type": "extension",
            "rocket_mode_compatible": "True",
            "name": "pyApex",
            "description": "Apex Project BIM Utils",
            "author": "Aleksey Melnikov",
            "author_profile": "https://github.com/melnikovalex",
            "url": "https://github.com/apex-project/pyApex.git",
            "website": "https://github.com/apex-project/pyApex",
            "image": "",
            "dependencies": []
        },
        {
            "builtin": "False",
            "type": "lib",
            "rocket_mode_compatible": "True",
            "name": "Revitron",
            "description": "A Revit API wrapper",
            "author": "Marc Anton Dahmen",
            "author_profile": "https://github.com/revitron",
            "url": "https://github.com/revitron/revitron.git",
            "website": "https://revitron.readthedocs.io/en/latest/",
            "image": "",
            "dependencies": []
        },
        {
            "builtin": "False",
            "type": "extension",
            "rocket_mode_compatible": "True",
            "name": "Revitron UI",
            "description": "The Revitron UI extension for pyRevit",
            "author": "Marc Anton Dahmen",
            "author_profile": "https://github.com/revitron",
            "url": "https://github.com/revitron/revitron-ui.git",
            "website": "https://revitron-ui.readthedocs.io/en/latest/",
            "image": "",
            "dependencies": [
                "Revitron"
            ]
        },
        {
            "builtin": "False",
            "type": "extension",
            "rocket_mode_compatible": "True",
            "name": "pyStructure",
            "description": "Extension for Revit Structure",
            "author": "Shahabaz Sha",
            "author_profile": "https://github.com/sampy23",
            "url": "https://github.com/sampy23/pyStruct.extension",
            "website": "",
            "image": "",
            "dependencies": []
        },
        {
            "builtin": "False",
            "type": "extension",
            "rocket_mode_compatible": "True",
            "name": "MEPDesign",
            "description": "Extensions for Revit MEP",
            "author": "André Rodrigues da Silva",
            "author_profile": "https://github.com/andrerdsilva",
            "url": "https://github.com/andrerdsilva/MEPDesign.git",
            "website": "http://engenheirohidraulico.com.br/",
            "image": "",
            "dependencies": []
        },
        {
            "builtin": "False",
            "type": "extension",
            "rocket_mode_compatible": "True",
            "name": "pyTiBa",
            "description": "pdf/dwg_export with user specified filename, Excel import",
            "author": "Tillmann Baumeister",
            "author-url": "https://github.com/tillbaum",
            "url": "https://github.com/tillbaum/pytiba.git",
            "website": "https://github.com/tillbaum",
            "image": "",
            "dependencies": []
        },
        {
            "builtin": "False",
            "type": "extension",
            "rocket_mode_compatible": "True",
            "name": "EF-Tools",
            "description": "Set of custom tools.",
            "author": "Erik Frits",
            "author_profile": "https://www.linkedin.com/in/erik-frits/",
            "url": "https://github.com/ErikFrits/EF-Tools.git",
            "website": "https://www.erikfrits.com",
            "image": "",
            "dependencies": []
        },
        {
            "builtin": "False",
            "type": "extension",
            "rocket_mode_compatible": "True",
            "name": "pyChilizer",
            "description": "A collection of tools for Revit.",
            "author": "Archilizer",
            "author_profile": "https://archilizer.com",
            "url": "https://github.com/dnenov/pyChilizer",
            "website": "https://archilizer.com",
            "image": "",
            "dependencies": []
        },
        {
            "builtin": "False",
            "type": "extension",
            "rocket_mode_compatible": "True",
            "name": "pySSG",
            "description": "IronPython Scripts for Autodesk Revit.",
            "author": "Kyle Bruxvoort",
            "author_profile": "https://kbrux.com",
            "url": "https://github.com/kbruxvoort/SSG.extension.git",
            "website": "https://github.com/kbruxvoort/SSG.extension",
            "image": "",
            "templates": {
                "youtube": "https://www.youtube.com/watch?v=",
                "author": "Kyle Bruxvoort"
            },
            "dependencies": []
        },
        {
            "builtin": "False",
            "default_enabled": "True",
            "type": "extension",
            "rocket_mode_compatible": "False",
            "name": "Cross-Tools",
            "description": "Extensions for Cross Architecture",
            "author": "Erich Domme",
            "author_profile": "https://github.com/CrossArchitecture",
            "url": "https://github.com/CrossArchitecture/Cross-Tools.git",
            "website": "https://github.com/CrossArchitecture",
            "image": "",
            "dependencies": []
        },
        {
            "builtin": "False",
            "default_enabled": "True",
            "type": "extension",
            "rocket_mode_compatible": "False",
            "name": "cross",
            "description": "Extensions for Cross Architecture",
            "author": "Erich Domme",
            "author_profile": "https://github.com/CrossArchitecture",
            "url": "https://github.com/CrossArchitecture/cross.git",
            "website": "https://github.com/CrossArchitecture",
            "image": "",
            "dependencies": []
        }
    ]
}

I assumed that I could do exactly the same procedure on the server and asked our IT to replace the original extension.json file with my customised one. Unfortunately, I get this error message. Could someone help me with this? And please note anything that is not so common in this issue as it is the first time I am creating one.

pyrevit_error

jmcouffin commented 1 year ago

if all of your team has pyRevit installed, I suggest using this command line:

pyrevit extend ui cross https://github.com/CrossArchitecture/cross.git --dest=C:\pyrevit

jmcouffin commented 1 year ago

using the --help command of the pyrevit CLI will get you going image

and regarding the error you get, it is probably just a syntax error, and you don't need to do that anyway

CrossArchitecture commented 1 year ago

Thank you for your answer. To protocol our approach. We decided to clone the repo to our server and use the extension via pyRevit>Setting>Custom Extension Directories. However, this method works with limitations as far as updating is concerned. This must be done via a pull request and not via update as we have solved it locally so far.

jmcouffin commented 1 year ago

Ok, you could still add the path to your server folder with the pyrevit CLI command

pyrevit extensions path add C:\yourPath

    pyrevit extensions paths [(-h | --help)]
    pyrevit extensions paths forget --all [--log=<log_file>]
    pyrevit extensions paths (add | forget) <extensions_path> [--log=<log_file>]