Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Really, really long file names 2

Status
Not open for further replies.

MikeHalloran

Mechanical
Aug 29, 2003
14,450
0
0
US
The boss has some interesting ideas. He is, of course, the boss.

Our drawings don't have title blocks. What they have instead is an incredibly long and descriptive file name, that reads sort of like an Army description of a simple object. A hypothetical example might read like:

"Box 20in x 20in x 8in NEMA 4 steel wall mount left hinge right paddle latch gray with white panel.dwg". That would be a master template. Each project would get a customized version, so the project's directory would have a drawing with even more text in the title, comprising the project number xxxx-yy, the contractor's name, the owner's name, the site's name, and maybe some identifying information beyond that.

Additionally, the drawings are stored in a directory tree that is excessively deep and excessively wordy, with directories having names like "Engineering Database", "Drawings", "Customer Database", deeply nested, and again with project number/contractor/..etc all concatenated.

[ There is a certain logic to the system. If the boss, a known computerphobe, can conjure up part of a project or item's description, Windows Explorer can find it; you don't need a browser that can search for text inside CAD files. ]

No way could you back up any of this stuff on an ISO CD, because the filenames and pathnames are way too long. We don't do backups, of course, and I don't even want to discuss that.

What's driving me crazy is that, thanks to templates and projects derived from similar projects and suboptimal discipline, there may be hundreds of sets of six or eight or twenty files with the same name, or with names that are identical for the first hundred characters or so, spread all over the server.

Some of them do differ from one another, but you can't distinguish the filenames from one another in Windows Explorer without scrolling. That's a minor problem, though.

In AutoCAD, you can't distinguish them from one another at all, because the filenames don't fit in the title bar of a window; they are truncated with ellipsis...

Okay, you say, AutoCAD has system variables that hold both filename and pathname. Except ... DWGNAME and DWGPREFIX are truncated with ellipsis in the text window.

The ellipses imply that the entire name and the entire path are somehow stored, but they're not accessible by any means I have conjured so far. All I want to do is extract the whole filename and the whole pathname from the drawing file, and paste them into the drawing field, so when you look at the screen or a print, you can tell which file you're looking at, and where it is. Transcribing them character by character between Windows Explorer and AutoCAD is just too laborious and error- prone.

Anyone?



Mike Halloran
Pembroke Pines, FL, USA
 
Replies continue below

Recommended for you

Can you drag the window to make it long enough? Or drag the vertical bar separating the columns way to the right, then ou can scroll to the right.
 
In Windows Explorer, yes you can drag window edges around, but the screen isn't big enough to see both the full filename and the full pathname, and in some cases, it isn't big enough to see either one in its entirety. These are really long filenames.

AutoCAD, in response to "setvar <space> dwgname", responds with a newline, a prefix like "DWGNAME =" , and then truncates the filename to ~60 characters, prepended with a " and appended with an ellipsis and ". In other words, it assumes that I'm working with a damn Teletype.






Mike Halloran
Pembroke Pines, FL, USA
 
Sounds like you are begging for a PDM of some sort. Trying to store so much info in the file name can get unwieldly as the number of files grow. A PDM can let you search and even keep more info for searches and storage. I would seriously try to talk your boss into indexing the files into shorter names and allow another way to store and look up info on those files. Even and Excel table or folder names are better than those kind of naming conventions. If the business grows to any degree, it will be a blessing later I assure you. My 2 cents.

"Everybody is ignorant, only on different subjects." — Will Rogers
 
Hi Mike,

I agree with borgy, you definitly need some sort of document management. But in the meantime, if you want to cut and paste DWGPREFIX and DWGNAME you can do it this way (quick and dirty):

At the command prompt:
Code:
(setq x (getvar "DWGPREFIX"))

Then (still at the command prompt):
Code:
(setq y (getvar "DWGNAME"))

Then:
Code:
(setq z (strcat x y))

Finally, either of these should let you see the whole thing:
Code:
(princ z)

or

Code:
!z

HTH
Todd
 
Borgy, I agree, but this is a tiny outfit. The boss is not cheap, but the money almost literally comes out of his pocket. Did I mention he hates computers?

I keep thinking that it should be possible to make Access walk the directory tree, and store filename/pathname as records, and update it regularly. That would be a small start.

Todd, that appears to be just what I need for now.

Thanks, all.


Mike Halloran
Pembroke Pines, FL, USA
 
Well, I screwed around with it some more. Todd's stuff works as advertised. To write the information into the field of the drawing, I tried DTEXT and MTEXT, both of which wrap the text at some arbitrary number of characters.

I figured someone has to have solved this problem already, and eventually blundered into qstamp.lsp, published as TIP1176A.LSP in the Dec 95 issue of Cadalyst. It doesn't wrap the text.

I'm downloading Columbus right now.




Mike Halloran
Pembroke Pines, FL, USA
 
The qstamp.lsp works nicely, except for the bugs. I've found the source of two, and am looking for a third. I've also rearranged the output a little, so it can better deal with really long names, etc.



Mike Halloran
Pembroke Pines, FL, USA
 
I used Columbus for part of the day.

I was impressed by its ability to produce a thumbnail of AutoCAD files. I liked being able to list the blocks and xrefs. We don't use title blocks anyway, so that capability is superfluous. I do have a few drawings with title blocks, and it doesn't pick up the contents; I'm assuming they have to be tagged somehow.

I was not impressed by its inability to look into Excel or Word files without launching its viewer. I was annoyed that I could not launch the viewer against multiple files. I was incensed that the viewer is 'modal', meaning basically that you have to close it before you can do anything else.

It's a nice program for free. To use it over a network, you have to buy the 'Pro' version, which goes for ~$300 a seat. I don't think a file viewer could ever be worth that kind of money, unless I have overlooked some astronomically useful capability.



Mike Halloran
Pembroke Pines, FL, USA
 
Oh. Yeah. I was greatly relieved that installation of Columbus (from a 38Mb distribution file) went smoothly, and did not require a reboot, because the computer I sit at and use for CAD is also _the_ server for the business.



Mike Halloran
Pembroke Pines, FL, USA
 
Status
Not open for further replies.
Back
Top