File paths in various programs


File paths in various programs
#1
I'm seeking your wise advice on proper file paths (relative or absolute) for the various LDraw tools, and why they don't seem to behave the same between themselves.

In my ldraw folder I have these sub-directories, among others:
p/
parts/
Unofficial/
User/

Unofficial (for uncertified tracker parts) and User (for my own parts) each have their own p/ and parts/ subfolders, so they are both valid ldraw libraries. User also has a number of subfolders for parts authoring projects.

So I'm working on a part in one of those project folders in the User library, and it uses a custom primitive that is also in the User library (obviously in User/p/). To get this primitive to appear in LDPE, I have to give it this path: User\p\48\prim.dat. Some notes:
  • User is set at the "parts authoring" folder in LDPE, and Unofficial is set as the "Unofficial" folder (even though they're both unofficial libraries).
  • LDPE creates its own "ldparteditor-temp-project" folder, which I'm not using (never found the reason to). It's located outside my ldraw folder.
  • I've used relative paths in LDPE before, but for some reason ..\p\48\prim.dat doesn't work.

Now on to LDView. When I open the same part in LDView, the custom primitive isn't found, even though both User and User/p/ are set as extra search paths. To make the prim appear, I have to change the pathname to the full pathname from my disk (so Users/nwperry/ldraw/User/p/48/prim.dat).

Finally, out of curiosity I tried LDCad. In this case, the full pathname didn't work, but it was sufficient to just use 48\prim.dat as you would expect in any part file. User is designated as one of my unofficial libraries in LDCad's settings, and in this case the behavior is as I expect: it finds the primitive in the p folder in that library.

So the question is, could I do something differently so that all these programs will find the custom primitive, without having to have a different version of the part file for each different tool?
And are all these programs behaving as expected? It seems odd that I have an unofficial primitive in an unofficial library, but the programs don't find it there even though I've specifically set them up to do so.
Reply
RE: File paths in various programs
#2
(Yesterday, 21:37)N. W. Perry Wrote: I'm seeking your wise advice on proper file paths (relative or absolute) for the various LDraw tools, and why they don't seem to behave the same between themselves.

I would recommend fully separating libraries and user content.

For example I use these items in my (ldcad) search path:
d:\LDraw\complete-2504.zip
d:\LDraw\ldrawunf.zip
d:\LDraw\projects\

You could optionally unzip the zips into their own subfolders.

This assumes the used tools differentiate between normal and library locations.

If not you will probably need to merge the two zip contents like so:

d:\LDraw\library\p  (from complete.zip)
d:\LDraw\library\parts  (from complete.zip)
d:\LDraw\library\unofficial\p  (from ldrawunf.zip)
d:\LDraw\library\unofficial\parts  (from ldrawunf.zip)
d:\LDraw\projects\

ps: LDCad will still (also) look in the unofficial subfolders of library locations/zips, but personally I don't use that much.
note: also using locations which are sub locations of libraries might crash LDCad Big Grin , Beta 2 will warn about that and remove the offending location from the list.
Reply
RE: File paths in various programs
#3
(Yesterday, 22:30)Roland Melkert Wrote: I would recommend fully separating libraries and user content.

For example I use these items in my (ldcad) search path:
d:\LDraw\complete-2504.zip
d:\LDraw\ldrawunf.zip
d:\LDraw\projects\

You could optionally unzip the zips into their own subfolders.

This is actually how I'm set up now, as far as LDCad is concerned. Additionally, I do have the zips unzipped; the only thing is that complete.zip is not a subfolder, it's just the p and parts subfolders at the top level of the ldraw directory. In other words (using your directory names):

d:\LDraw\complete-2504.zip
d:\LDraw\p\
d:\LDraw\parts\
d:\LDraw\ldrawunf.zip
d:\LDraw\unofficial\
d:\LDraw\projects\

Quote:This assumes the used tools differentiate between normal and library locations.

If not you will probably need to merge the two zip contents like so:

d:\LDraw\library\p  (from complete.zip)
d:\LDraw\library\parts  (from complete.zip)
d:\LDraw\library\unofficial\p  (from ldrawunf.zip)
d:\LDraw\library\unofficial\parts  (from ldrawunf.zip)
d:\LDraw\projects\

So if I were to use the ldparteditor temp folder, this would be my hierarchy exactly. Maybe I should do that?

Quote:ps: LDCad will still (also) look in the unofficial subfolders of library locations/zips, but personally I don't use that much.
note: also using locations which are sub locations of libraries might crash LDCad Big Grin , Beta 2 will warn about that and remove the offending location from the list.

No crashes as of yet. The only thing that happens with LDCad is that if I search a part, it won't show me both the official and unofficial version(s) of the part, only the one that is set highest in the preferences. (This is probably intended behavior.)
Reply
RE: File paths in various programs
#4
(Yesterday, 21:37)N. W. Perry Wrote: Now on to LDView. When I open the same part in LDView, the custom primitive isn't found, even though both User and User/p/ are set as extra search paths. To make the prim appear, I have to change the pathname to the full pathname from my disk (so Users/nwperry/ldraw/User/p/48/prim.dat).

I just tested on my Mac, and LDView 4.6 was able to find 48/user-p.dat in <ldraw dir>/User/p/48 when <ldraw dir>/User/p was in its extra search dirs. This is the expected behavior, so I'm not sure why it wouldn't work for you. What OS are you using?
Reply
RE: File paths in various programs
#5
(Yesterday, 23:55)Travis Cobbs Wrote: I just tested on my Mac, and LDView 4.6 was able to find 48/user-p.dat in <ldraw dir>/User/p/48 when <ldraw dir>/User/p was in its extra search dirs. This is the expected behavior, so I'm not sure why it wouldn't work for you. What OS are you using?

15.4.1 Sequoia.

I tried moving my project file out of the projects folder and into the top level of User, but it didn't help.
Reply
RE: File paths in various programs
#6
(Yesterday, 23:27)N. W. Perry Wrote: The only thing that happens with LDCad is that if I search a part, it won't show me both the official and unofficial version(s) of the part, only the one that is set highest in the preferences. (This is probably intended behavior.)

Yes this is by design, all parts from all library locations are flattened into a single cache (config/parts.inv).
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 3 Guest(s)