dup and dbconcat Windows problems

  • Anonymous - 2008-07-24

    We're using Windows version 7.12.2, and have found operational problems with dup and dbconcat commands?
    The GUI Import function seems functional, but not these commands.

    Any advise would be appreciated. Thanks.


    • David Loman

      David Loman - 2008-07-24

      Any way you can post more details?  Perhaps a step by step list of what you are doing?

    • Anonymous - 2008-07-24

      Conceptually, it appears that files requiring the use of "outside" tcl scripts or converters, must reside in the BRL-CAD/bin folder, or at least sourced to this location to work properly.  The "old-school" functioanlity of keep and dbconcat/dup are desired to complete file comparisons for same names, then depending on the output, decide to keep or dbconcat with a prefix.

      • Sean Morrison

        Sean Morrison - 2008-07-30


        Really not sure I follow what your issue actually is that you're running into.  Instead of your own diagnosis -- what are you actually trying to do and what specific problem/error are you running into? :-)  Few notes related to what you said, though:

        Sources may be sourced from any path.  The GUI dialog on Windows may default to some suboptimal path, but the 'source' command and menu option should let you bring any file in.

        I don't see anything that would prevent writing a script that does comparisons and has routines for performing a corresponding keep/dbconcat with/without prefixes.

        There is a g_diff command-line tool (i.e. not an mged command) that compares two .g files and reports all differences.  Alas, I don't believe that one has been ported to Windows yet so you'd have to use cygwin, set up the build yourself, or find a Mac/Linux box to run the tool.

        Hopefully some insight in there.


    • Anonymous - 2008-08-04

      Thanks Sean.
      I found out that these files need to reside in the BRL-CAD folder and not the BRL-CAD/bin as previously described.
      The problem is still seen when trying to work within the same directory, dbconcat/keep/dup all work, but perform their operations only to the BRL-CAD folder.

      Thanks for the inputs.


      • Sean Morrison

        Sean Morrison - 2008-08-05

        You're still not really making sense (and didn't answer my question..) and it sounds like you have some misunderstanding as to where things need to be.

        Script files you're sourcing can be sourced from anywhere.  Any indication to the contrary is either a problem in the script or a user mistake.

        I'd still need a specific example of what you have and what you're trying to do in order to help you.  Too many vague prepositions.. :-)


    • Anonymous - 2008-08-12

      Allow me to s-l-o-w this down...

      We'll begin with a file, sean.g, in the following directory...
      We then start mged, and open sean.g.  This file has several groups in it, but we want to export the suspension group to its on separate file.  Therefore we type the following command...
           mged> keep suspension.g suspension
      This file is written to the following directory, and not to the directory mentioned above where sean.g resides
           C:\Program Files (x86)\BRL-CAD

      This "problem" is inverted when attempting to use dbconcat or dup where sean.g would need to exist in the BRL-CAD folder as well as the file.g you specify when using these commands.

      When I originally posted the question, it wasn't apparent that these commands were working because their output file was to a completely separate directory. (Which is in contrast to the Linux version of these commands.)  While inconvenient, I at least now know they still "work," and how to use them.

    • David Loman

      David Loman - 2008-08-12

      Sounds like a working directory issue.  If you are starting MGED from windows, then the default working directory IS the %installationDir%/bin/ regardless of where the file that you open resides.  In *Nix, one typically 'cd's to the appropriate directory, THEN executes mged, thus the working directory would be the dir they launched MGED from... which also happens to be the dir the file resides in.

      When doing dup and/or dbconcat in the windows port of MGED, try using absolute paths, aka:

      keep /projects/ARL/suspension.g suspension
      dup /projects/ARL/sean.g
      dbconcat /projects/ARL/sean.g /


      Also, you can 'pwd' and 'cd' from the MGED command prompt to get your working directory where it needs to be.

      Lastly, if you use make alias of %installationDir%/bin/mged.bat, you can change the 'start in' property of the alias and that will set the current Working Directory inside of MGED for you.  (this is the option i use since Aliases are easy to make, copy and edit.  I have them EVERYWHERE in my work directories)

      Hope that helps
      -Dave L

    • Anonymous - 2008-08-12

      BIG thanks Dave!  That's all I was looking for.

    • David Loman

      David Loman - 2008-08-13

      No problem at all.  For future reference (to anyone reading this thread really), start off a "trouble, need help" with a detailed description of what you were doing, and what MGED did in return.  That always speeds up the troubleshooting!

      With that being said, don't be afraid to post questions, feature requests and bug reports!

    • Anonymous - 2008-08-13

         While the absoute paths suggested above ("keep /projects/ARL/suspension.g suspension"), seems logical I'm having trouble getting it to work.  The file path goes through my "Documents and Settings/Desktop/Project/etc."

      Do you think its having problems with the spaces in the directory name?

    • David Loman

      David Loman - 2008-08-13

        Make sure that you are using absolute paths and not relative ones.  It is usually much easier to start at root "/" and path your way from there.  Example:

      "Documents and Settings/Desktop/Project/myDotG.g" is a relative path while
      "/Documents and Settings/Desktop/Project/myDotG.g" is an absolute path

      ..I won't go deeper into a relative/absolute discussion because: A) don't want to appear to be 'talking down' to anyone and B) Google can explain it better than I can anyways ;)

      The whitespace *Could* be an issue.  Just surround the path with quotes:

      dup Documents and Settings/Desktop/Project/myDotG.g -> dup "/Documents and Settings/Desktop/Project/myDotG.g"

      -Dave L

    • Anonymous - 2008-08-13

      Got it.

      Your tact is appreciated.


Log in to post a comment.