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

    Re: Export Selected Only DWG Export

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    2 Posts 2 Posters 851 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.
    • L Offline
      lightbody
      last edited by

      Hi all,

      This must have been answered somewhere but I've been kind of searching for years as to whether this is possible...Anyone seen a plug in?

      Thanks!

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

        Select what you want to export from your model.
        Invert the selection [there are plugins for this] - or use this snippet in the Ruby Console + <enter>.

        
        m=Sketchup.active_model
        m.start_operation('DWG_ss', true)
         ss = m.selection
         es = m.active_entities
         es.erase_entities(es.to_a - ss.to_a)
         m.definitions.purge_unused
         m.layers.purge_unused
         m.materials.purge_unused
        m.commit_operation
        
        

        Immediately after that run the File > Export > DWG operation [with whatever Options you desire].
        Then use the Edit > Undo menu item to step backwards to the point before you erased things.
        The exported DWG will be OK, and the model should be back to where you started...
        The DWG should not have unused things like blocks, layers etc...

        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