• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Xref Manager

Scheduled Pinned Locked Moved Plugins
97 Posts 43 Posters 80.0k 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.
  • T Offline
    TIG Moderator
    last edited by 7 Mar 2008, 16:37

    Name : XrefManager.rb

    Description : Tools - 'Add Xref Component', 'Add Xref DWG/DXF',
    "Make Into Xref, 'Xref Settings'**** and 'Manage Xrefs'
    added to Plugins menu under 'Xrefs Tools...'
    **** = Currently on PCs only.
    On PCs it NO LONGER requires 'win32ole.so' in the Plugins folder.

    Author : TIG (c) 2005 - 2012

    Usage :
    Add Xref Component:

    A file-browser dialog asks you to select a '.skp' file to
    insert into the model as an "Xref Component".*** If you Cancel
    the browser or the file is not a '.skp' or you try to insert
    the model back into itself you will get an error dialog and it
    exits without adding anything. You pick one and OK and it is
    added and is placed where you want in the model.
    The added Xref Component is also given two new "XrefManager"
    entity attributes, which also identify it as an Xref Component
    for future Xref Manager use, named:
    "FilePath" i.e. path to the original skp file.
    "FileAge" i.e. date the original skp file was last modified.

    The Add is easily Undo-able.

    ***An 'External (Xref) Reference' means that if you insert a
    component from a file and then change the original file, you
    can then use the Xref Manager or Xref Settings to Refresh it.

    Add Xref DWG/DXF:

    This Tool is NOW available on PC AND MAC !
    NOTE: in the NEWEST version it will use the last used set of options
    so ensure that Merge/Orient/Units are set as you want in an earlier
    import, also leave 'preserve-origin' ON.
    A file-browser dialog then asks you to select a '.dwg/dxf' file
    to insert into the model as an "Xref DWG/DXF Component".
    If you Cancel or it's not a '.dwg/dxf' then you will get an
    error dialog and it exits without adding anything. Normally
    you'll pick a suitable file and select OK.
    The selected file is added to the model as an Imported DWG/DXF
    Xref Component named as the dwg/dxf file

    • e.g. "SitePlan.dwg". It's placed at the equivalent to the
      dwg/dxf's X,Y,Z in the model; you can always Move it later, BUT
      keeping Xrefs aligned is often critical.
      Component will be given the new "XrefManager" entity Attributes,
      named:
      "FilePath" i.e. path to the original skp file.
      "FileAge" i.e. date the original skp file was last modified.

    The Add is easily Undo-able.

    Make Into Xref:

    Select any component in the model. Select the 'Make Into Xref'
    Tool. That component is made into an Xref Component. If there
    is no selection or the selected item is not a component then
    there are error dialogs. If the component is 'internal'** -
    then a dialog suggests you do the following - select the
    component in the Component Browser, Right-click and pick
    Save-As. It is now saved externally and it can then made into
    an Xref with this Tool... Using this Tool on an existing Xref
    Component will update its File-path and Last-modified
    Attributes to the external file's current settings*.
    This Tool is also useful for fixing Xrefs that have problems
    Refreshing etc because the Component Browser's 'Delete'
    function has been used and/or it's been manually 'Reloaded'
    from the Browser - loosing some Xref Attributes in the process,
    or ones that have been made into ordinary components with
    'Bind' and you'd like them back as Xrefs - *depending on its
    state the confirming dialog will say ..XXX 'made into'.. or
    're-created as an'.. Xref Component...
    **NOTE if you run this on an Xref DWG/DXF Component it is also
    'internal', so you are warned what it is, and it than exits
    without doing anything - if you really want to save it as an
    external component you can still do so manually...

    Xref Setting:

    This Tool is available on 'PC' only

    • sorry 'MAC' users !
      It opens a dialog which lets you set the type of Xref Checking
      that runs when you first open a model containing Xref
      Components - you can choose two options if the chosen setting
      is 'Open Xref Manager If Needed' and it finds anything that
      needs fixing then it opens 'Xref Manager' (see below).
      Note than changes done initially at startup are NOT
      subsequently undo-able. If it is set to 'Do Nothing' then
      there is no initial checking.

    Xref Manager:

    This allows you to manage Xref Components. If there are no
    Xref Components to manage then an error dialog tells you and it
    exits. Otherwise a dialog lists each Xref Component by its
    type (.SKP:/.DWG:/.DXF:), name and its Status... e.g.

    .SKP: Building-1 i.e. it's all OK - path confirmed, loaded and up-to-date.
    .SKP: Building-2 [ Un-Pathed ] i.e. remembered file path no longer exists.
    .SKP: Building-4 [ Superseded ] i.e. original skp file has been changed recently.

    Any DWG/DXF Xrefs are also included in the Manager list at the
    end and are prefixed to suit, e.g.
    .DWG: SitePlan [ ... ] i.e. a dwg of the site...
    .DXF: Building-9 [ ... ] i.e. a dxf of building-9...

    They can be 'OK'd' (Un-Changed), 'Deleted' or 'Bound',
    they can also be 'Refreshed' and 'Re-pathed' in a similar way as SKPs.

    Each Xref Component listed has a drop-down to its right giving
    a choice of Actions - these are defaulted to suit the present
    Status and the likely Fix (1 of first 3) thus:

    "OK..." i.e. leaves Xref Component unchanged.

    "Refresh" i.e. refreshes Xref Component from the original
    file - you do not need to refresh unless its
    Status is shown as 'Superseded'.

    "Re-Path" i.e. resets the path of the original file - you do
    not normally need to Re-Path, unless you have
    moved or renamed the original file and its
    Status is shown as 'Un-Pathed', however you
    might want to change a placed Xref for another
    file.

    "Bind" i.e. removes the "XrefManager" attributes and makes
    the Xref Component into an ordinary component.
    You can undo this with 'Make Into Xref' which
    will convert the component back into an Xref
    one.

    "Delete" i.e. deletes any Xref Component instances in the
    model - please use 'Delete' with care !

    On picking the OK button each listed Xref Component is
    processed with the selected Action thus:

    'Refresh' means the Xref Component is updated from a file. The
    old version in the comp-browser is renamed as
    'Xref-Scrap[nn]' and becomes an ordinary unused component
    that will be removed from the model data-base if you select the
    Auto-Purge-Unused option (PC only), or when you next pick
    'Purge Unused' on the compo-browser dialog fly-out (a dialog
    asks / reminds you of this). If you picked 'Refresh' but the
    file is shown as Un-Pathed then 'Re-Path' will run as set out
    in the paragraph below, asking you to re-define the file-path.

    'Re-Path' runs a file-browser dialog that asks you to select a
    '.skp' file to reinsert into the model as the Xref Component.
    If you Cancel the browser or the file is not a '.skp' or you
    try to insert the model back into itself you will get an error
    dialog and it exits without processing that Xref Component -
    also any remaining on the list are also NOT processed

    • you will need to re-run the tool. Otherwise Re-path is
      similar to Refresh in the way 'Xref-Scrap[nn]' is made...

    'Bind' removes the "XrefManager" attributes and make the Xref
    Component into an ordinary loaded component. You can undo
    'Bind' by using the 'Make Into Xref' Tool...

    'Delete' erases the Xref Component Instances in the model.
    The version in the compo-browser is renamed as
    'Xref-Scrap[nn]' and becomes an unloaded ordinary component;
    it will be removed from the model data-base if you select the
    Auto-Purge-Unused option (PC only), or when you next pick
    'Purge Unused' on the compo-browser dialog fly-out (a dialog
    asks / reminds you of this). Use Xref 'Delete' with care !

    It is recommended that you Refresh only ONE DWG/DXF at a time,
    otherwise it can take a long time and sometimes errors might
    occur with multiple refreshings (multiple SKP's are usually OK).

    If you cancel out of a Re-Path during an Xref Manager session
    it might not all complete successfully and an error dialog
    warns you.
    At the end of processing the Xrefs that were listed then a
    report dialog is displayed showing what was done.
    (Note: A currently known, but unidentified, bug sometimes means
    that to close this dialog more than one click on 'OK' might be
    required ! )

    All Actions Undo - depending on the list and action then more
    than one Undo might be needed.

    Notes:

    Do NOT manually 'Reload' an Xref Component from the Component
    Browser or Context-Menu - it'll lose its Xref Attributes (the
    same result as 'Bind'). But you can use the 'Make Into Xref'
    tool to convert it back into an Xref Component...

    From v2.3 on PC AND MAC using SUp >=v6 all 'old' Xref Components
    will be removed from the model data-base if you select the
    Auto-Purge-Unused option, or when you next pick 'Purge Unused' on
    the compo-browser dialog fly-out (a closing dialog asks / reminds
    you of this). Do NOT user the Component Browser 'Delete' option to
    remove former Xrefs - this might cause the current Xref to fail
    to Refresh properly. You will need to Reload it from the
    Component-Browser and use the 'Make Into Xref' tool to convert
    it back into an Xref Component...

    Type : Tool

    Version :
    1.0 26/11/05 First issue.
    1.1 27/11/05 Error with mpath = "" if unsaved now trapped.
    1.2 28/11/05 Error with menu call typo fixed.
    1.3 03/12/05 Xref Class added ( for TBD ! ).
    1.4 10/12/05 'Add Xref' dialog now has [0,0,0] placement
    clue in title-bar. 'Refresh/Repath/Delete'
    reminders now only one per dialog session.
    'Xref Settings' Tool added to allow settings
    for Xref.check which runs at model open, if
    needed suggests use 'Xref Manager'. 'Make Into
    Xref' Tool added. Xref Component description
    now prefixed with 'XREF: '.
    1.5 12/12/05 Name of script corrected to 'XrefManager.rb'
    - doh ;-}
    1.6 20/12/05 Start_operation glitch trapped for Mac users.
    1.7 21/12/05 Mac friendliness improved ? Undos improved.
    1.8 21/12/05pm Mac friendliness re-improved ?
    1.8a 21/12/05pm Mac version = cut-down - no setting/check -
    limited issue...
    1.9 21/12/05pm Forced refresh/repath improved. Setting/Check
    reinstated (at end). Xref.make() improved.
    2.0 22/12/05 Xref.check waits for model info to load then
    runs Xref.manager. Report after Xref.manager
    layout improved.
    2.1 22/12/05 Mac cannot now use Xref.setting/check option
    - saves failures.
    2.2 22/12/05 Platform checking improved.
    2.3 25/01/06 Automatic Purge-Unused (PC only) added.
    3.0 06/02/06 Add Xref id split into Component(SKP) & DWG/DXF
    (PC only). Xref Manager now identifies
    SKP/DWG/DXF Xrefs separately, currently some
    actions for these are only available on PC.
    3.1 08/02/06 Timer default etc and dwg management adjusted
    following beta testing.
    3.2 27/02/06 Timer issues resolved.
    3.3 10/05/06 Version fix for extra import types, Naming of
    dxf and DXF etc allowed.
    3.4 12/05/06 Typos corrected etc.
    3.5 10/06/06 Manager Message glitch fixed if only skp's.
    3.6 11/06/06 More Manager glitches fixed.
    4.0 13/01/07 Updated to work with SUp v6.
    4.1 14.01.07 Trapped for empty model not making a component of its
    first imported DWG/DXF.
    4.2 15/01/07 PC AND Mac Auto-Purge All now available if SUp 6.
    Glitch with multiple Manager report dialogs fixed.
    5.0 05/03/08 Glitch with Make Xref fixed.
    5.1 07/03/08 Menu error fixed (sorry !).

    6.0 20120907 DWG/DXF import simplified - for PC AND MAC. Misc updates.
    6.1 20140303 Now made v2014 compliant [more major update stalled 😞]

    Get the latest version from the PluginStore http://sketchucation.com/pluginstore?pln=XrefManager

    TIG

    1 Reply Last reply Reply Quote 0
    • D Offline
      davecoopstl
      last edited by 8 Aug 2008, 13:56

      TIG,

      Is the Xref Manager supposed to open automatically when I open my SketchUp file (that contains x-refs)?

      Under Xref Settings, I chose to "Open Xref Manager If Needed" on opening, but it doesn't do it when I open the file.

      It would be great to know, as soon as I open the file, if the x-refs need to be updated.

      Let me know.
      Thanks!
      Dave.

      PS - Any chance of getting an Icon Toolbar for this Plugin?

      1 Reply Last reply Reply Quote 0
      • B Offline
        bianhai
        last edited by 8 Aug 2008, 14:30

        Very good!Thank you ! πŸ‘

        1 Reply Last reply Reply Quote 0
        • D Offline
          davecoopstl
          last edited by 22 Aug 2008, 18:51

          TIG,

          One other question: Is there any way to put a prefix before the names of the imported layers when you x-ref a file into your model?

          Right now, if I have multiple files I need to x-ref in, and they have the same layer names, but different things on the layers that I want to show, the objects get combined onto one layer in my model. It would be great to have a prefix added to the imported layer names, which would be different for each x-ref.

          Just a thought.
          Dave.

          1 Reply Last reply Reply Quote 0
          • A Offline
            airsuper
            last edited by 27 Aug 2008, 19:03

            i found out i can't import DWG files with capital letter file extension.
            eg. "abc.DWG" not ok
            "abc.dwg" ok
            i hoping that will be improve over time.

            1 Reply Last reply Reply Quote 0
            • D Offline
              David M
              last edited by 11 Mar 2009, 07:45

              Hi, can you please let me know where I can download the latest verion of the X-ref Plugin.

              Thanks!

              1 Reply Last reply Reply Quote 0
              • Chris FullmerC Offline
                Chris Fullmer
                last edited by 11 Mar 2009, 07:58

                This might very well be the latest, in the very first post is a script to download.

                Chris

                Lately you've been tan, suspicious for the winter.
                All my Plugins I've written

                1 Reply Last reply Reply Quote 0
                • D Offline
                  davecoopstl
                  last edited by 21 Jul 2009, 16:51

                  TIG,

                  This script is amazing. We're using it to model a huge site, with lots and lots of buildings, and it's working beautifully. The ability to know what has and has not been updated, and update the modified 'xrefs' is invaluable.

                  But, we've encountered one major 'design' flaw with the script. We have almost 30 xrefs loaded in the model, and the Xref Manager dialog box does NOT fit on the screen anymore, so there's no way to click the "OK" button. And there doesn't seem to be a way to adjust the size or orientation of the dialog box!

                  Is there a way that the size of the dialog box can be flexible or adjustable or, at the very least, include a scroll bar! We really need to be able to see the entire list of xrefs, and scroll down to click the "OK" button.

                  Hope you can help.
                  Thanks for all your hard scripting work!
                  Dave Coop.

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TIG Moderator
                    last edited by 22 Jul 2009, 08:28

                    @davecoopstl said:

                    TIG,

                    This script is amazing. We're using it to model a huge site, with lots and lots of buildings, and it's working beautifully. The ability to know what has and has not been updated, and update the modified 'xrefs' is invaluable.

                    But, we've encountered one major 'design' flaw with the script. We have almost 30 xrefs loaded in the model, and the Xref Manager dialog box does NOT fit on the screen any more, so there's no way to click the "OK" button. And there doesn't seem to be a way to adjust the size or orientation of the dialog box!

                    Is there a way that the size of the dialog box can be flexible or adjustable or, at the very least, include a scroll bar! We really need to be able to see the entire list of xrefs, and scroll down to click the "OK" button.

                    Hope you can help.
                    Thanks for all your hard scripting work!
                    Dave Coop.

                    XrefManager hasn't been updated for many 'years' ! Unfortunately when it was written the only dialogs available were very limited with no ability to move/resize, add scroll-bars, tick-boxes etc - so this problem with extra long lists was known - the current [old] fix is [was] to split you site into two [or perhaps more] sub-site models and then xref those into a single master-site; then the individual 'plot' model file xref goes into the appropriate smaller sub-site model; then you'll get manageable lists - but you do need to remember to update the sub-plot model xrefs and then update the master-model xrefs... 😞

                    The good news is that more recent versions of the API let you use 'web-dialogs' which are much more flexible and allow longer lists, tick-boxes, scroll-bars etc etc πŸ˜„

                    The bad news is I haven't any time to update it [yet] 😞

                    Look out over the coming 'months' rather than 'years' !!! πŸ€“

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      davecoopstl
                      last edited by 22 Jul 2009, 11:31

                      TIG,

                      Thanks for the info. We pretty much figured out the sub-xrefing system. It kind of stinks, because you are constantly checking to make sure the xrefs inside of xrefs are updated, but it does work.

                      Meanwhile, we can NOT wait until you have time to update the script! It sounds like you know exactly how to fix the dialog box, but just need time to do it. Hopefully you'll have time to get to it in the not-so-distant future.

                      Again, thanks for all the great work. We'll keep an eye out for an update to this amazing script.
                      Thanks!
                      Dave Coop.

                      1 Reply Last reply Reply Quote 0
                      • halroachH Offline
                        halroach
                        last edited by 24 Jan 2010, 12:11

                        This is a great plugin!
                        I had a bit trouble navigating through the forum until I noticed that the latest version was 5.1 and not 5...

                        I recommend merging the two threads
                        http://forums.sketchucation.com/viewtopic.php?f=180&t=7329
                        http://forums.sketchucation.com/viewtopic.php?f=323&t=7289

                        FlexTools - Super Quick Windows, Doors, Slats...

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          stefx
                          last edited by 2 Jun 2010, 11:28

                          TIG,
                          I downloaded the file.
                          When i tried to import any dwg i got this note:

                          "This requires 'win32ole.so' to be in the Plugin folder!
                          Exiting... "

                          Any tips?

                          Stef.

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            TIG Moderator
                            last edited by 2 Jun 2010, 12:12

                            Unzip this in your Plugins folder...win32ole.zip

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • S Offline
                              stefx
                              last edited by 2 Jun 2010, 15:42

                              fast answer.
                              good answer.
                              useful answer.

                              thank you very much TIG.

                              stef.

                              1 Reply Last reply Reply Quote 0
                              • marvins_dadM Offline
                                marvins_dad
                                last edited by 6 Aug 2010, 14:37

                                I was looking to try this out to combine 3 large files.

                                but...
                                http://www.sketchucation.com/forums/scf/viewtopic.php?f=57&t=7330

                                Seems that the Tutorial has vaporized.

                                Any ideas if there are any other locations that can give me an idea how to get around with this ruby?

                                Thanks

                                My Gallery

                                1 Reply Last reply Reply Quote 0
                                • T Offline
                                  TIG Moderator
                                  last edited by 6 Aug 2010, 15:08

                                  XrefManagerHelpNotes.pdf

                                  TIG

                                  1 Reply Last reply Reply Quote 0
                                  • marvins_dadM Offline
                                    marvins_dad
                                    last edited by 6 Aug 2010, 15:24

                                    Thanks! πŸ‘ πŸ˜„

                                    My Gallery

                                    1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      pulsezip
                                      last edited by 4 Sept 2010, 00:37

                                      Does this plugin work for sketchup 7 or 7.1 ?

                                      1 Reply Last reply Reply Quote 0
                                      • T Offline
                                        TIG Moderator
                                        last edited by 9 Sept 2010, 20:21

                                        I should work for v7/7.1/8 BUT it really does need a major overhaul... BUT there's a loooong list 😞

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • P Offline
                                          prospero spring
                                          last edited by 27 Sept 2010, 17:33

                                          Hi TIG,
                                          I just upgraded my SketchUp to V8 Pro but the V5.1 is not working anymore. I can get an advice to fix it?
                                          Thanks,

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

                                          Advertisement