To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 11153
11152  |  11154
Subject: 
Re: Library search paths.
Newsgroups: 
lugnet.cad.dev
Date: 
Sat, 23 Apr 2011 13:06:22 GMT
Viewed: 
20211 times
  
In lugnet.cad.dev, Timothy Gould wrote:
In lugnet.cad.dev, Roland Melkert wrote:
Hi all,

I'm working on my new editor and wondering on how to implement default color
loading.

I wanted to let the system look for ldconfig.ldr much like normal parts etc, but
this won't work cause it's in the root ldraw dir instead of parts or p.

So how 'weird' would it be to include the root ldraw dir in search paths by
default, so it becomes (on my system)

C:\Program Files (x86)\ldraw\parts\
C:\Program Files (x86)\ldraw\p\
C:\Program Files (x86)\ldraw\

Anyone think that's a bad idea?

Well those directories are often write-protected and given other sorts of
restrictions. A better place would be {USER}\Documents\ldraw.

I don't think you should use the normal search strategy (enhanced or not)
for ldconfig.ldr because it's a special case.  It's got global scope, and
it's not referenced by name in your ldraw files.  Tim's on the right track.
A good strategy would be to look for more personalized versions first.
Something like:

  1. The directory containing the main ldraw file.
  2. {USER}\Documents\ldraw
  3. LDRAWDIR

I think maybe Lars posted some code for this eons ago, and perhaps that
code made it's way into ldview?

  http://sourceforge.net/projects/ldrawini/

Enjoy,

Don



Message has 1 Reply:
  Re: Library search paths.
 
(...) <snip> (...) Lars' project looks interesting but my generic LDraw search handling code is all done. I'm only looking for a way to get the 'default out of the box' colors in place upon first start. The user can change that of course but it (...) (14 years ago, 23-Apr-11, to lugnet.cad.dev)

Message is in Reply To:
  Re: Library search paths.
 
(...) Well those directories are often write-protected and given other sorts of restrictions. A better place would be {USER}\Documents\ldraw. Tim (14 years ago, 23-Apr-11, to lugnet.cad.dev)

5 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR