Donate Now Goal amount for this year: 2500 USD, Received: 2174 USD (87%)

Results 1 to 10 of 10

Thread: Script runs from editor, but error in player?

  1.    #1
    Forum Addict jmk's Avatar
    Join Date
    December 31, 2012
    Location
    NM, USA
    Posts
    1,474
    Current Local Time
    08:23 AM

    Script runs from editor, but error in player?

    I have a script that pushes information to various parameters in my door family. I found out yesterday that I had failed to test with groups. I modified those project parameters to vary by instance and tested again - ran without issue. However, when I asked the user to run (through Dynamo player) it still gives the group error. I can recreate the issue on my machine.

    Changes to groups are allowed only in group edit mode. Use the Edit Group command to change to all instances of a group type. You may use the "Ungroup" option to proceed with this change by ungrouping the changed group instances.

    Any idea why the error is generated when running via Dynamo Player, and not when the same script is run via the editor? The script runs from Player without issue when there are no grouped doors. Any idea of a way to fix it, or is this just a bug and users will have to run from the editor until it's fixed?

    This is in Revit 2019. Dynamo is 2.0.3 (I know there are newer versions of Dynamo, but it appears that they install with 2020)

  2.    #2
    Member johnp's Avatar
    Join Date
    March 24, 2015
    Posts
    154
    Current Local Time
    07:23 AM
    Quote Originally Posted by jmk View Post
    This is in Revit 2019. Dynamo is 2.0.3 (I know there are newer versions of Dynamo, but it appears that they install with 2020)
    Yes. This is true. Newer versions only come with Revit point releases. That being said, 2.x.x versions will remain compatible per semantic versioning.

    ---

    By chance are there other parameters with that same name?

  3.    #3
    Forum Addict jmk's Avatar
    Join Date
    December 31, 2012
    Location
    NM, USA
    Posts
    1,474
    Current Local Time
    08:23 AM
    The script runs without errors from the dynamo editor. It only brings up the edit group error when I run it from Player AND there are doors in groups in the project (it runs fine from player if there are only un-grouped doors). I want users to run scripts from player, so they aren't scared off by seeing code )

    Quote Originally Posted by cellophane View Post
    How are you collecting your doors? And what type of parameter(s) are you updating? Some of them are super picky if they are modified outside of a group-edit session

    The attached group is specifically setup to select groups (and any nested groups) and push parameters into elements in the group, but the theory should transfer over. I do get a warning from the Elements.SetParameterByNameTypeOrInstance node, but the graph itself still runs fine.
    I'm collecting the doors by category, then filtering for the ones I want to modify/pull data from. The only built in parameter I'm setting data in is the Mark parameter. The rest are project parameters (text) created specifically to hold the schedule information (pulled from nested family type marks or materials). At the type level I'm also setting the Fire Rating Parameter.

    I would like to work on modifying my script to push information into the groups, but I don't have time to do that before October, so I changed all the affected parameters to "vary by group instance" and froze one set parameter that isn't critical and will require more work to fix (passing room information to a signage family - for rendering)

    Quote Originally Posted by johnp View Post
    Yes. This is true. Newer versions only come with Revit point releases. That being said, 2.x.x versions will remain compatible per semantic versioning.

    ---

    By chance are there other parameters with that same name?
    I was asking about versions in case scripts working in the editor/causing errors from player was a bug fixed in a later version.

    I'm pretty sure there aren't any identical parameter names, since except for the "Mark" parameter they are custom project parameters created specifically for this script. Even if there were, it seems like it would cause the error no mater how the script was run or with un-grouped doors, and it doesn't.

  4.    #4
    Member johnp's Avatar
    Join Date
    March 24, 2015
    Posts
    154
    Current Local Time
    07:23 AM
    With identical parameter names it is definitely a hit or miss. Sometimes it sets one, other times it sets the other. So it could vary from player to the full UI.

  5.    #5
    Forum Addict jmk's Avatar
    Join Date
    December 31, 2012
    Location
    NM, USA
    Posts
    1,474
    Current Local Time
    08:23 AM
    Quote Originally Posted by johnp View Post
    With identical parameter names it is definitely a hit or miss. Sometimes it sets one, other times it sets the other. So it could vary from player to the full UI.
    Good to know. As far as I can tell I don't have identical parameters, and since it runs fine from player when there aren't grouped doors in the project I don't think that is the cause.

  6.    #6
    Member johnp's Avatar
    Join Date
    March 24, 2015
    Posts
    154
    Current Local Time
    07:23 AM
    Do you have a sample? There is definitely something weird with player then.

  7.    #7
    Forum Addict jmk's Avatar
    Join Date
    December 31, 2012
    Location
    NM, USA
    Posts
    1,474
    Current Local Time
    08:23 AM
    I think I was able to narrow it down a bit - it seems that player doesn't skip frozen nodes.

    I was able to recreate the issue from scratch in a default template. From the editor the frozen node setting the comments parameter (which can't vary by group) is skipped, but in player it triggers the error.

    Here are the test files I was using: https://designgroupnm-my.sharepoint....dWkPQ?e=a9rZUN

    If you want the original script I can email it to you.

    oddly, my machine lets me run the original script without issue from player this morning. I thought it might have been fixed by the 2019.2.2 update, but I couldn't recreate that fix on another machine, so there may be additional factors at play...

  8.    #8
    Member johnp's Avatar
    Join Date
    March 24, 2015
    Posts
    154
    Current Local Time
    07:23 AM
    OMG, I bet that is it. At the BILTNA hackathon, someone on the Dynamo team mentioned this to me in regards to programatically reading a DYN from JSON. Let me ping them and see.

  9.    #9
    Forum Addict jmk's Avatar
    Join Date
    December 31, 2012
    Location
    NM, USA
    Posts
    1,474
    Current Local Time
    08:23 AM
    Quote Originally Posted by johnp View Post
    OMG, I bet that is it. At the BILTNA hackathon, someone on the Dynamo team mentioned this to me in regards to programatically reading a DYN from JSON. Let me ping them and see.
    Thanks! I can work around the issue, but I hope there is a fix in the works, because frozen nodes are an easy way to quickly customize, troubleshoot and check progress!

  10.    #10
    Member johnp's Avatar
    Join Date
    March 24, 2015
    Posts
    154
    Current Local Time
    07:23 AM
    Yep! I sent them this video and I am opening an issue on the Dynamo repository.
    https://www.youtube.com/watch?v=HTbv...ature=youtu.be

Similar Threads

  1. Dynamo Player cofiguration
    By DaveP in forum Dynamo BIM
    Replies: 2
    Last Post: March 14th, 2019, 02:00 PM
  2. Dynamo Player
    By snowyweston in forum Dynamo BIM
    Replies: 22
    Last Post: April 3rd, 2018, 02:19 PM
  3. Alphabetize the Scripts in the Player?
    By safoulkes in forum Dynamo BIM
    Replies: 2
    Last Post: January 29th, 2018, 06:34 PM
  4. Odd Error Message In Family Editor
    By LukeEvans in forum Architecture - Family Creation
    Replies: 0
    Last Post: October 8th, 2015, 02:39 AM
  5. Script Error on Startup
    By Mel in forum Architecture and General Revit Questions
    Replies: 0
    Last Post: October 29th, 2012, 09:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •