sketchucation logo sketchucation
    • Login
    1. Home
    2. Nick60
    3. Topics
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    N
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 12
    • Groups 1

    Topics

    • N

      How to get the saved file path

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      13
      0 Votes
      13 Posts
      2k Views
      OricAtmosO
      Hey, I ran into the same problem as Nick60 today and was glad I found this thread with an nice solution. However there's still one use case with a problem: when the user saves the model with "Save copy as..." the side-car file will be saved under the wrong name. Any suggestions how this could be fixed?
    • N

      How to show property value in HTML Description

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      8
      0 Votes
      8 Posts
      2k Views
      Dan RathbunD
      (edit) **Disregard - Off Topic** HTML <HTML> <HEAD> </HEAD> <BODY onload="GetXYfromRuby()"> <INPUT TYPE=text VALUE="" NAME="LenX"> <INPUT TYPE=text VALUE="" NAME="LenY" onchange="CalcArea()"> <!-- put this description DIV anywhere you want --> <DIV ID="Description">This is the fabulous Rectangle component<p>You can set LenX and LenY<p>The calculated area, based on your input is <SPAN ID="Span_AreaXY"></SPAN></DIV> <!-- at the bottom of your webDialog HTML --> <SCRIPT Language="Javascript"> function ShowAreaXY(AreaXY) { Span_AreaXY.innerText=AreaXY.toString(); } function CalcArea() { var AreaXY; AreaXY=LenX.value*LenY.value; ShowAreaXY(AreaXY); } GetXYfromRuby() { window.location.href = 'skp;get_data@queryforXY'; // your ruby callback will do two commands; // js_command = 'LenX.value=componentLenX;' // js_command = 'LenY.value=componentLenY;' // when LenY INPUT control gets value the onchange event fires // calling CalcArea() which then calls ShowAreaXY } </SCRIPT> </BODY> </HTML> Havenot tested this, so you'll need to wring out the bugs. For example of the ruby callback, See: http://sketchupapi.blogspot.com/2008/02/sharing-data-between-sketchup-ruby-and.html
    • N

      How to use zeroed prefixed string?

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      3
      0 Votes
      3 Posts
      948 Views
      TIGT
      CHOOSE with OPTIONINDEX() returns INDEX, so it might be of use to you... Since VALUE(text) converts text to a number make sure there's nothing doing that... Does #002 work and strip off the # ?
    • 1 / 1