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

    Posts

    Recent Best Controversial
    • Reliable retrieval of dynamic component attributes

      Hi there,

      Newbie here, trying to figure out dynamic component attributes. I'm trying to write a script that returns the name and the lenx, leny, lenz attributes of all the dynamic component instances in a model. I've got a script that works (ie it runs without error), but it doesn't return any values. It returns either empty strings or 'nil'. I've discovered that if I update the attributes of a particular instance with the 'Component Attributes' dialog, it will then return the values I have input, but only those values. Furthermore, those values don't change if I subsequently rescale the component with the scale tool.

      Also, I've noticed that if I use the set_attribute method to update an attribute, the component in question will not change in the model, but I will be able to retrieve the updated value using get_attribute.

      I've seen talk on these forums of 'redrawing' components, but there is no redraw method listed in the API. Have I missed something? Is there some way to update/refresh attributes as well as the model view? Any help would be greatly appreciated.

      posted in Plugins
      M
      mullz
    • 1 / 1