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!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    How to use zeroed prefixed string?

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    3 Posts 3 Posters 972 Views 3 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.
    • N Offline
      Nick60
      last edited by

      Sorry for the silly question, but I can't find the answer elsewhere:

      I have a Dinamic Component with this property:

      ItemCode = "ID" & CHOOSE(Index,"002","008","020")

      The formula always delete the beginning zeros
      (i.e. ItemCode returned value is "2" or "8" or "20")

      I've tried with some workaround (using X instead of zeros and then substitute) without success, but I understand it depends on how text strings are treathed by SketchUp formulas.

      Please note that I've setted the property as TEXT (and not default Text)

      How can I specify SketchUp formulas not to delete the preceding zeros ?

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        I did some experimenting just as you did, and it doesn't appear to be possible to display zero-padded strings. I also don't see any functions that would help.

        Error 404 (Not Found)!!1

        favicon

        (sketchup.google.com)

        Hi

        1 Reply Last reply Reply Quote 0
        • TIGT Offline
          TIG Moderator
          last edited by

          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 # ?

          TIG

          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