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

    Automatic Export Scenes to .dwg/.dxf

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 7 Posters 2.5k Views 7 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.
    • J Offline
      jon4777
      last edited by

      Hi,

      Has anyone endeavored to create a script that automatically exports scenes as .dwg or .dxf to a predefined location? I've seen some scripts that claim to do it, but don't really. This would greatly improve my workflow, as I often start a building design and move to AutoCAD.

      Even if anyone has some tips on how to get this done, or do it myself, that would be greatly helpful. I have no Ruby knowledge, which is the hardest part.

      Thanks

      1 Reply Last reply Reply Quote 0
      • jolranJ Offline
        jolran
        last edited by

        I thinking people use Layout for that?
        1 scene each page for ex. >> export dwg. No?

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          @jolran said:

          I thinking people use Layout for that?
          1 scene each page for ex. >> export dwg. No?

          +1

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • G Offline
            gneacsu3002
            last edited by

            im working on a plugin that does just that but im having trouble selecting the format of the exported dwg file.
            Does anyone knows how to pass file description 'AutoCAD 2000 dwg files'?

            I have tried this

            options_hash = { :description => 'AutoCAD 2000 DWG Files', :faces => true, :edges => true, :geometry => false, :text => true, :dimensions => true } Sketchup.active_model.export '/my_export.dwg', options_hash

            Doesnt work!
            And i get this message afterwards 'Autocad export audit: OK'...how to make it not appear?


            Untitled.png

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

              @gneacsu3002 said:

              And i get this message afterwards 'Autocad export audit: OK'...how to make it not appear?

              ALL objects in Ruby except a false ( FalseClass) and nil ( NilClass) object, EVALUATE logically, as true.

              This means your options hash will eval as true, because it is a Hash class object. It does not matter if the hash has members, or what they are referencing.

              The model#export() method takes a boolean value as the 2nd argument, EXCEPT and ONLY when you are exporting to DAE format. IN that case, and ONLY that case, the 2nd argument can be a Hash of options.

              So you are trying to use a options hash with DWG or DXF, (which does not work,) and the method is testing the 2nd argument in a boolean sense, which evals as true, ... so the summary window is displayed.

              Just omit the 2nd argument. It will default to false for the summary.

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • G Offline
                gneacsu3002
                last edited by

                thank you for the answer, that cleared things out..
                i thought that is a general description of the function and that i can pass true, false or a hash as the second argument.
                now that being said it doesn't work as it suppose to... no matter what i pass as the second argument the message continues to appear

                1 Reply Last reply Reply Quote 0
                • A Offline
                  Arpas
                  last edited by

                  What about this:
                  File/export/2d Graphic
                  Then save as: .dwg
                  You can set a shortcut also.

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    chrisconcise
                    last edited by

                    I am an avid sketchup promoter and user and have follow and use many extensions created by the authors from this thread
                    i am very interested in being able to export all scenes to layout, does anyone know how you can import all the scenes from your sketchup model into individual viewports in layout, i usually have to create over 50 individual pages and individually select each scene for each viewport, is there any way to do this automatically
                    I would be very grateful to pick your brains
                    let me know if you have anyway of accomplishing this, writing a macro, or anything
                    Please let me know any thoughts you might have
                    cheers!

                    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