Modifying Form Field .rect properties error

  • Modifying Form Field .rect properties error

    Posted by Isaac Harned on January 4, 2023 at 6:48 pm

    I am trying to write simple code to reposition my form fields using (x, y) coordinates. I have a template where the form fields are sized and positioned correctly, and I am querying the console to find the true (x, y) of named form fields using this code:

    var formField = getField(“FreefillType1-1”);

    var rect = formField.rect;

    console.println(rect);

    This completes successfully on the good template, as well as the template I am trying to modify, but as soon as I try to change the .rect of anything with a dash, it gives me an undefined error:

    var BOXTAG1 = getField(“BOXTAG1”);

    var AirType1 = getField(“AirType1”);

    var FreefillType1 = getField(“FreefillType1-1”);

    BOXTAG1.rect = [790.6942749023438,737.7821655273438,972.76611328125,717.6009521484375]; //success

    AirType1.rect = [790.6942749023438,716.6566772460938,972.7678833007812,696.47509765625]; //success

    FreefillType1.rect = [605.5161743164062,695.4284057617188,789.7205810546875,675.246826171875]; //undefined

    Steps I have taken in troubleshooting:

    – verified field name, copied and pasted

    -renamed the form field with an underscore instead of dash

    -Used brackets around the form field name

    The attached file is the one I am currently working on

    Liz Larsen replied 1 year, 11 months ago 3 Members · 10 Replies
  • 10 Replies
  • Liz Larsen

    Member
    January 5, 2023 at 2:40 pm
    Points: 4,855
    Rank: UC2 Brainery Orange Belt IIII UC2 Brainery Orange Belt IIII

    I haven’t checked in to UChapter2 in a couple weeks and boy oh boy am I excited to see some more coding questions. It’s like Christmas Part 2! You have the best questions, @isaac-harned 🙂

    I will take a closer look at this probably tomorrow and over the weekend.

    • Isaac Harned

      Member
      January 5, 2023 at 6:28 pm
      Points: 8,113
      Rank: UC2 Brainery Purple Belt III UC2 Brainery Purple Belt III

      Thank you Liz, this has been the bane of my last couple of days!

  • Liz Larsen

    Member
    January 5, 2023 at 9:57 pm
    Points: 4,855
    Rank: UC2 Brainery Orange Belt IIII UC2 Brainery Orange Belt IIII

    So I fiddled with this, doing all the things you did. I even renamed it various names that should work, like “test”. Still returned undefined.

    Then I decided maybe that particular textbox was glitchy and I’d remake it. I copied it, deleted it, then CTRL+SHIFT+V, named it back to the original “FreefillAct1-1” and it worked ¯\_(ツ)_/¯

    Who tf knows?

    • David Cutler

      Member
      January 6, 2023 at 5:15 am
      Points: 26,784
      Rank: UC2 Brainery Advanced Brown Belt UC2 Brainery Advanced Advanced Brown Belt Rank

      Nice!!!!! 😎

      • Liz Larsen

        Member
        January 6, 2023 at 5:48 am
        Points: 4,855
        Rank: UC2 Brainery Orange Belt IIII UC2 Brainery Orange Belt IIII

        Hey, no guarantee it’ll work for Isaac. I’m interested to see what his results are.

        • David Cutler

          Member
          January 6, 2023 at 7:53 am
          Points: 26,784
          Rank: UC2 Brainery Advanced Brown Belt UC2 Brainery Advanced Advanced Brown Belt Rank

          Sounds about like my experience with Power Query so far. I can get it to produce what I want once, but it seems as if when I do what I think is the exact same thing again I get different results… 🤔

          I’m sure that it is operator error and that I can figure it out, just haven’t made the time to do so yet…

    • Isaac Harned

      Member
      January 9, 2023 at 2:36 pm
      Points: 8,113
      Rank: UC2 Brainery Purple Belt III UC2 Brainery Purple Belt III

      Hmm that’s not encouraging, but sounds right. I have had various glitches when it comes to these form fields and modifying their properties en masse, and it is a very similar glitch. I will try this out and report back =)

      • Isaac Harned

        Member
        January 17, 2023 at 5:05 pm
        Points: 8,113
        Rank: UC2 Brainery Purple Belt III UC2 Brainery Purple Belt III

        So I tested this, and verified. Unfortunately its apparently not the only one. There seems to be no indicator when these fields drop off, everything else about the field was fine and modifiable. May be a support ticket in the end..

        • David Cutler

          Member
          January 18, 2023 at 5:44 am
          Points: 26,784
          Rank: UC2 Brainery Advanced Brown Belt UC2 Brainery Advanced Advanced Brown Belt Rank

          Never hurts to reach out and get “on the list” @isaac-harned even if it takes them a bit to get to looking into the issue. It would be somewhat satisfying if the issue ended up being a “them” issue rather than a “you” issue…

        • Liz Larsen

          Member
          January 18, 2023 at 7:57 am
          Points: 4,855
          Rank: UC2 Brainery Orange Belt IIII UC2 Brainery Orange Belt IIII

          Oof, that’s rough. I’m glad we discovered how to fix it, but it’s unfortunate it’s a glitch on Bluebeam’s part. In their defense, it’s probably an ultra rare glitch.

          I agree about submitting a support ticket and sending them the file. You might be the one who brings this to light for the first time and they’ll be able to fix it thanks to your file. Fingers crossed.

Log in to reply.