sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Text variable within a component?

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 228 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • artmusicstudioA Offline
      artmusicstudio
      last edited by

      hi,
      is there a ruby-variable, which can show

      the NAME OF THE COMPONENT-INSTANCE

      even when the text (=variable) is placed within the component definition?

      i would like to achieve, that the name of the instance (unique, while created by my ruby, is displayed thru my ruby-script,
      but the text always is moved with the component by the user (it "sricks" to it),

      but i don't want to create a group 'around' them.

      is there any solution for that idea?
      thanx
      stan

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        Both the definetion and the instance have their own name() and name=() methods.
        But these attributes are displayed in the EntityInfo dialog. (They are not text objects.)

        You could wrap the instance and a text object within a unique group. Then they would move together.

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • artmusicstudioA Offline
          artmusicstudio
          last edited by

          hi dan,
          yes, i understand.
          i solved the problem with the following solution:

          the component-related text is placed outside
          and with every calculation per ruby it is selectively deleted and placed with new parameters
          at the new components position.

          seems to work well.

          stan

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement