Garrett, This information is not stored anywhere and is generally not reliably deducible once the file is opened. There are a couple things you can do, though, that might give you what you need depending on why you need to know the full path.
At a basic level, the only means that comes to mind is to stash the location of the file at the time it was opened. Basically, you call pwd the same time opendb is called, and can deduce the full path based on whether opendb's path is absolute or relative. If you really need to, you can even override mged's opendb command to make it do more than what it presently does, such as recording the full file path. Whether that's useful depends on how/when opendb is being called, so please do share more detail on what your goal is. Keep in mind that's you're not going to get a 100% reliable file path because you can actually continue to work on a deleted file. You can open a file (in any application), delete or move the file, and continue to work with that file until the application closes it's handle on the file or quits. At some point, you're going to have to accept what you know as "good enough" and rely on documented behavior. Cheers! Sean On Oct 26, 2009, at 7:12 PM, Garrett Holland wrote: > Is there a way that a TCL script can determine the location of the > model > file currently being edited? > > opendb gives the location relative to where it was used, but if a user > does a cd to somewhere else, that prevents the script from locating > the > model. I've done a lot of RTFM but I can't seem to find a way to get > this info into my script. > > Thanks > -- > SprinklerTech Inc.Garrett Holland > [email protected] > 704.877.2553 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ BRL-CAD Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-users
