sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Automatic naming of sub-components

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    3 Posts 2 Posters 17.8k 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.
    • T Offline
      Tomgood
      last edited by

      Hy Its my first post here so let me know if Im at the wrong place.

      I`m looking for a way to label my components inside my dynamic cabinet in one step. I hoped there would be a plugin which it would allow me to add a Nr. to each sub-component.
      Or is there a way to add a function in my dynamic component which allows me to rename my components in one step?
      For e.g. I have a dynamic component (see attachment) which contains two sides, top/bottom and one back. Each component has already a letter assigned. I write my plans in French so it would be “C” (Cote/Sides) “D” (Dos/Back) “HB” (Top/Bottom).
      If I have multiple cabinets, I would add a nr. at each component e.g. C1,D1,HB1
      This way every part will be assign to its cabinet 1,2,3…. Which will be labeled in my plans for the shop.
      I create my cut lists with “cut list 4.1”
      I add a full example in the attachment so you can better understand what my problem is.

      I`m thankful for any inside here
      Regard Thomas


      This is a part of my modle


      Cutlist+Plan-Layout

      1 Reply Last reply Reply Quote 0
      • P Offline
        pcmoor
        last edited by

        Instance names are automatic updated in outliner, DC option and attribute dialog, also labels in layout. So my recommendation is to use component names for generic terms like panel, board, box...then their #numbers are somewhat redundant. And specific for instance names

        The attached file contains a DC, select one of the instance name for any of the generic panels in outliner. Change this instance in Entity info and you will see that its updated in the option and attribute DC dialog. There is a report attached to the file and this is reference to the instance name too.
        The parts are made from one DC panel that is placed using a version of the rotation rectangle script, to place, orientate and scale as require, plus excess to the options.

        As you would be aware, cutlist 4.1 reports component definition names. However you can change the cutlist script to use the instant names if available otherwise the component name by going into the ruby file and replacing compName = c.definition.name in the reporter

        Capture.jpg

        if c.name == "" then compName = c.definition.name else compName = c.name end
        save, if sketchup open, close and reopen for the script to reload,

        Note if you do decide to use the "power" of instance names for your DCs, then you cannot use the "Name" attribute in the component info section as this disables this function, plus when first creating a DC this does not work, until you have "saveas" it to a folder and inserted an instance.
        (You can use _name in the value section to reference the existing definition name if require for an attribute like description = _name & " " & lenx & "x" & leny )

        If you wish to create the DC placing script, please ask, then will show what I use, but note the ruby,though works is still at a basic level, I am still learning and do not have the expertise of some of the others on this forum.


        4 Drawer unit.skp

        1 Reply Last reply Reply Quote 0
        • T Offline
          Tomgood
          last edited by

          Thank you "pcmoor"

          I really appreciate you helping me out hear.

          I do not have any programming skills jet. So it will probably take me a while to understand your replay fully.

          But just a thought tough.
          Do you think its possible to change the script from “cutlist 4.1” that it would add the “Definition” of the DC component to its subcomponent’s “definition”?
          That way I wouldn’t have to change any of my dc and the way I name them.

          Thank you very much
          Regards Thomas

          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