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

    Topics

    • JHJ

      Ruby scripted Dynamic Attributes reporting Issues

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      6k Views
      Dan RathbunD
      @jh said: ... I dont get it why I cannot get the lenx, leny and leny to report in any Ruby- driven Report-Script I tried, until some User-Interaction with the Component-Options has been made, ... The default values are stored in the DC definition's "dynamic_attributes" dictionary and the DC instance just uses the defaults until the user changes them. When they are different than the default, the DC code will create instance specific attributes in the instance's "dynamic_attributes" dictionary. So the "rule of thumb" for Ruby coding DCs is to always first check the instance's "dynamic_attributes" dictionary, then check the definition's "dynamic_attributes" dictionary for dynamic attribute values.
    • JHJ

      How do I correctly set the Length formulas in a DC via Ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      1k Views
      JHJ
      Whow! This seems to work, Now I just need to take care of the units. I will post a reply if I get the Script in a usable condition. It would be nice if You could take a look at it then. But I don't know when I'll get enough time for this. Maybe tomorrow, I got 2go and make Dinner, my Girlfriend already has the knife in her hand and I don't want her to use it on me. EDIT: I kept using the initial approach in setting the Lenx to _lenx_formula since the other way it left me with an unscalable Component, or at best with a scalable component which doesnt show the correct measurements as the corresponding values in the DC Dialog. But Hey, Thank You anyway, maybe someone else has use for the Code for another useful Plugin
    • JHJ

      Need Help adding predefined dynamic Attributes via Ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      904 Views
      JHJ
      Allright, Got it partly working, But I Cant get the Attribute-Inspectors to show the Values, I guess I dont really understand how to set the Formulas correctly to get the corresponding Values by now. The DC Browser shows the Values (Lengths of the Piece in X,Y and Z) but everything else does not, this means no reporting so far. Can anybody push me a little in the right Direction Where do I have to set the DC Attributes Instance or Definition? and how could I set it to both if needed? I tried to set it to the Definition and the second time I run the Script the created Geometry has no Attributes at all, or at least nothing important. The unfinished Script, still buggy
    • JHJ

      Strange DC behavior or is it just me ? Found the Mistake!

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      1
      0 Votes
      1 Posts
      4k Views
      No one has replied
    • 1 / 1