How to get Extension Format

Josef Behal
Josef Behal Member Posts: 22
10 Comments Name Dropper
**
Tagged:

Answers

  • Josef Behal
    Josef Behal Member Posts: 22
    10 Comments Name Dropper
    **

    How can I get Extension Format (binary/scripted) from the ACT Console command?

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 870
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭

    Hi @Josef Behal , I'm under the impression that there is no API to retrieve this.

    Can you tell me more about your use case? Thanks

  • Josef Behal
    Josef Behal Member Posts: 22
    10 Comments Name Dropper
    **

    I'm trying to automatically build the webex and I want to be sure that I'm referencing scripted extension, not binary. I have noticed that Extensions.BuildBinaryExtension raises the exception when it can not find the scripted version. I can use try... except… of course. I was just curious if it is possible to avoid this exception.

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 870
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭

    @Josef Behal Interesting use case. I've reported the missing API to the dev team. Currently, indeed, the best way to go would be through try….except. Another route you can consider is to force the scripted extension to be loaded in the first place:

    Extensions.LoadExtension(Id=GUID, Format="Scripted")
    

    where you replace GUID by your proper GUID number for the extension.

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee, GitHub-issue-creator Posts: 331
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    edited August 2023

    Note that GUID must use lowercase letters. But if you copy/paste from WB, it will contain uppercase! So, I recommend a small tweak to save a lot of frustration:

    Extensions.LoadExtension(Id=GUID.ToLower(), Format="Scripted")