• Login
sketchucation logo sketchucation
  • Login
🤑 30% Off | Artisan 2 on sale until April 30th Buy Now

Plugin interfering with DWG import (solved)

Scheduled Pinned Locked Moved Plugins
24 Posts 5 Posters 3.2k Views
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.
  • E Offline
    Edson
    last edited by 2 May 2012, 19:35

    I was trying to import a not-so-complex dwg into sketchup. it crashed every time I tried no matter what I did to the autocad file. then I tried it in another mac and it went on smoothly. from this I gathered it was something related to my own sketchup installation. next I started sketchup without rubies and tried importing the same file again. gess what: no problem.

    thus I came to the easy conclusion that some plugin interferes with the import action and makes sketchup crash. but the problem is: which plugin is the culprit? does anyone out there have a clue about this? I have many plugins installed.

    edson mahfuz, architect| porto alegre • brasil
    http://www.mahfuz.arq.br

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 2 May 2012, 22:06

      I am surprised. 😕
      A few rogue plugins can overwrite the base class/methods - like group.copy etc - and thereby return different results causing issues in legitimate tools using the 'proper' methods !
      Here are a few of the possible offenders...

      SketchyPhysics
      DrivingDimensions
      Matchbox
      SunTools[or similar]
      Off hand I might not have the names quite right, but you get the idea...
      [Recently the latest 'Podium' has been implicated in some issues too 😕 ]
      If you have any of these scripts in the Plugins folder try disabling them in turn until you find the culprit[s].
      Of course you might have a 'new one'... In that case you need to disable/retest 'by halves'... as explained in other threads until the rogue is found...
      🤓

      TIG

      1 Reply Last reply Reply Quote 0
      • E Offline
        Edson
        last edited by 3 May 2012, 11:07

        thanks, TIG. I shall investigate this as it is very annoying. most of the times it makes me think the dwg is at fault which is not always the case. I shall let you know what I find.

        edson mahfuz, architect| porto alegre • brasil
        http://www.mahfuz.arq.br

        1 Reply Last reply Reply Quote 0
        • E Offline
          Edson
          last edited by 3 May 2012, 11:39

          this is really weird: I divided my plugins folder into two halves: top and botton (each one holds about 50% of the original content). then I placed in both the the few plugins that ship with sketchup. to my surprise, importing the problem dwg works fine with both plugin folders containing different sets of plugins. the crashes only happen when I have the original folder containing all the plugins.

          would I be wrong in assuming the problem derives from the presence of some plugins at the same time in the same folder? if that is so, how do you suggest I go about identifying the ones that do not go together.

          by the way, I took the podium plugin out of the folder and sketchup crashed in the same way. thus probably it is not the culprit.

          edson mahfuz, architect| porto alegre • brasil
          http://www.mahfuz.arq.br

          1 Reply Last reply Reply Quote 0
          • T Offline
            TIG Moderator
            last edited by 3 May 2012, 12:40

            Take the half and add 50% of the other half.
            Retry, if it's OK the problem lies with something in the 25%.
            If it fails the issue is with something in the 75%.
            Move out ~half of the files you just added back.
            Retry etc, repeat until you find the one file that's causing the issue.
            Rub with just that file to check if it reacts badly when alone.
            Now leave that in the folder and start moving back ~half of the previous files until the error happens then you know the other file is in the last lot moved in.
            Move these out by halves until you zoom in on the other file.
            Test with both files together to see that they interact badly.
            Tell us what they are... 😕
            Obviously removing one or both of them at least temporarily will let you do the DWG work needed...

            TIG

            1 Reply Last reply Reply Quote 0
            • E Offline
              Edson
              last edited by 3 May 2012, 14:29

              NAILED IT! the file that was preventing me from importing dwgs is vector.flat_angle.rb which is required by pathcopy.rb (rick wilson). I ran several tests to make sure it was the one to blame. in order not to get error messages at startup I removed pathcopy.rb as well.

              perhaps it is worth saying that this is happening on mac os 10.6.8. I do not know how the plugin behaves on windows.

              edson mahfuz, architect| porto alegre • brasil
              http://www.mahfuz.arq.br

              1 Reply Last reply Reply Quote 0
              • T Offline
                TIG Moderator
                last edited by 3 May 2012, 14:45

                I don't have any issues with it [PC], though I rarely use it.
                It does add a method to the Vector class Vector.flat_angle to give the vector's angle as if it were 'flat' on the group.
                There must be something using its own new method of the same name but with different returned results ?
                You could try opening the files and changing flat_angle to flat_angleFOO with find/replace[all] - also rename the .rb file with +FOO to match.
                Then when pathcopy.rb requires/calls the code it won't have the same name, and should therefore not clash...
                [do it on copies in case you mess up]

                TIG

                1 Reply Last reply Reply Quote 0
                • E Offline
                  Edson
                  last edited by 3 May 2012, 15:02

                  @tig said:

                  I don't have any issues with it, though I rarely use it.
                  It does add a method to the Vector class Vector.flat_angle to give the vector's angle as if it were 'flat' on the group.
                  There must be something using its own new method of the same name but with different returned results ?
                  You could try opening the files and changing flat_angle to flat_angleFOO with find/replace[all] - also rename the .rb file with +FOO to match.
                  Then when pathcopy.rb requires/calls the code it won't have the same name, and should therefore not clash...
                  [do it on copies in case you mess up]

                  it is not working. could you have a look at the two modified files? thanks.


                  pathcopy.rb


                  vector.flat_angleFOO.rb

                  edson mahfuz, architect| porto alegre • brasil
                  http://www.mahfuz.arq.br

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    RickW
                    last edited by 3 May 2012, 16:44

                    I've not had problems with .dwg import on my PC, but I will investigate this on Mac.

                    RickW
                    [www.smustard.com](http://www.smustard.com)

                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      Edson
                      last edited by 3 May 2012, 16:53

                      @rickw said:

                      I've not had problems with .dwg import on my PC, but I will investigate this on Mac.

                      rick,

                      thanks for chiming in. I hope you can find out what is happening. pathcopy is very useful.

                      edson mahfuz, architect| porto alegre • brasil
                      http://www.mahfuz.arq.br

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        TIG Moderator
                        last edited by 3 May 2012, 19:33

                        Edson

                        This has every version FOO'd...


                        pathcopy.rb

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          scottlininger
                          last edited by 3 May 2012, 20:23

                          Hey Edson,

                          Does it fail with all DWGs, or just one in particular?

                          I installed Rick's script on SU8 Pro on my mac. Same OS version as you, and the DWG import worked for me. Could you share the file?

                          • Scott Lininger
                            SketchUp Software Engineer
                            Have you visited the Ruby API Docs?
                          1 Reply Last reply Reply Quote 0
                          • E Offline
                            Edson
                            last edited by 3 May 2012, 20:34

                            @tig said:

                            Edson

                            This has every version FOO'd...

                            bad news. it does not work either. sketchup crashes every time.

                            edson mahfuz, architect| porto alegre • brasil
                            http://www.mahfuz.arq.br

                            1 Reply Last reply Reply Quote 0
                            • E Offline
                              Edson
                              last edited by 3 May 2012, 20:36

                              @unknownuser said:

                              Hey Edson,

                              Does it fail with all DWGs, or just one in particular?

                              I installed Rick's script on SU8 Pro on my mac. Same OS version as you, and the DWG import worked for me. Could you share the file?

                              scott,

                              yes, I have basically been using one file for my tests but it fails with all dwgs. I can surely share the file.


                              03a_ANEXO-III-LEVANTAMENTO-TOPOGRÁFICO1.dwg

                              edson mahfuz, architect| porto alegre • brasil
                              http://www.mahfuz.arq.br

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                scottlininger
                                last edited by 3 May 2012, 21:21

                                Hrm. Edson, I grabbed that file and I'm not seeing a crash. I'm on SU 8.0.11751.

                                Even in there is something corrupted about your specific SketchUp install, it's very strange that a plugin would change the behavior. I guess we'll wait and see if Rick can recreate... either way it'll be another clue.

                                • Scott Lininger
                                  SketchUp Software Engineer
                                  Have you visited the Ruby API Docs?
                                1 Reply Last reply Reply Quote 0
                                • T Offline
                                  TIG Moderator
                                  last edited by 3 May 2012, 21:25

                                  @edson said:

                                  @tig said:

                                  Edson

                                  This has every version FOO'd...

                                  bad news. it does not work either. sketchup crashes every time.
                                  Strange all we have done is separate the Vector class/method into one that's unlikely to have a name clash... 😕
                                  So to recap...
                                  If you have those two .rb files loading then DWG fails.
                                  If you remove the files DWG works OK ?
                                  That's plain weird...
                                  Can you double check both edited files are in the Plugins folder...
                                  You don't have Fredo's tool loading to add an extra networked Plugins folder ???
                                  It might be loading an unedited version from somewhere ??????

                                  TIG

                                  1 Reply Last reply Reply Quote 0
                                  • E Offline
                                    Edson
                                    last edited by 4 May 2012, 16:28

                                    scott,
                                    my SU version is 8.0.13608.

                                    TIG,
                                    it is enough to remove vector.flat_angle.rb for SU to import the dwg without problems. I only removed the other to get rid of error messages asking for the other.

                                    you have only posted the edited pathcopy.rb file, not vector.flat_angle.rb.

                                    what fredo tool do you mean precisely?

                                    edson mahfuz, architect| porto alegre • brasil
                                    http://www.mahfuz.arq.br

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      TIG Moderator
                                      last edited by 4 May 2012, 18:29

                                      Fredo's AdditonalPluginsFolder [or similar name...]

                                      I'd disable both of RickW's files, as one needs the other etc...

                                      TIG

                                      1 Reply Last reply Reply Quote 0
                                      • E Offline
                                        Edson
                                        last edited by 4 May 2012, 18:45

                                        @tig said:

                                        Fredo's AdditonalPluginsFolder [or similar name...]

                                        I'd disable both of RickW's files, as one needs the other etc...

                                        no, I do not have that plugin by fredo6 installed.

                                        I have disabled both plugins. I am almost sure there are other plugins that help copy objects along a path.

                                        edson mahfuz, architect| porto alegre • brasil
                                        http://www.mahfuz.arq.br

                                        1 Reply Last reply Reply Quote 0
                                        • bigstickB Offline
                                          bigstick
                                          last edited by 5 May 2012, 08:59

                                          Actually every one of my Macs in the office (3 in total) has the same problem of being unable to import dwg files in SU Pro. This has been the case for every version of SU8 pro that I have used, and in the office it makes no difference whether we are on Lion or Snow Leopard.

                                          The import seems to work fine, the geometry seems to be imported, and the summary dialog pops up with the imported entities, but then SU crashes.

                                          Works fine on my MacBook Pro at home with the same version of SU Pro 8.0.11751 though. This probably has more plugins than any of the other machines.

                                          Pathcopy is not the culprit for me because it's on my home machine which works, and on my office machine, which doesn't.

                                          Works fine on the PC under all situations.

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

                                          Advertisement