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 / 9507
9506  |  9508
Subject: 
Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 17 Feb 2004 20:07:34 GMT
Viewed: 
4448 times
  
In lugnet.cad.dev, Michael Lachmann wrote:

"Don Heyse" <dheyse@hotmail.spam.go.away.com> schrieb im Newsbeitrag
news:Ht6s7G.1792@lugnet.com...
In lugnet.cad.dev, Lars C. Hassing wrote:
In lugnet.cad.dev, Michael Lachmann wrote:
The idea with environment variables is not bad, though there are two major
disadvantages against the methode implemented in MLCad (which uses some ini
file entries to define the search path, including an option for the user
wether the entry shell be visible for selection or not):

There is another disadvantage of this methode. Environment variables are
very system dependend and usualy are limited in there length. Personaly I
would prefere a methode in a .ini file in the MLCad form. Having the ini
file on a users home directory could be a good idea since users will have
write access to there home directory independend from the operating system.
The reason for using the MLCad.ini until now was to keep MLCad specific
settings there - but since its more public now I open to the location.

Yes, as Lars said earlier:

Environment variables are preferred, because they work on all platforms.
However, on Windows, if they are not set, ldraw.ini is then checked.
A sample ldraw.ini may look like this:

[LDraw]
BaseDirectory=C:\LDraw
LgeoDirectory=C:\L2P
LdrawSearch="<HIDE>C:\LDrawXtra\MyPrims\In Work|
      C:\LDrawXtra\MyParts\In Work|
      <MODELDIR>|<HIDE><LDRAWDIR>\BFC\P|<HIDE><LDRAWDIR>\BFC\PARTS|
      <HIDE><P>|<PARTS>|<MODELS>|<MODELS>\TEST|C:\LDrawXtra\MyParts\Done"

I like the single LdrawSearch variable because it's easier for me to
pull out of the ldraw.ini file, but I'm willing to go with your format
for the ldraw.ini file if you allow absolute paths.  Maybe something
like this?

[LDRAW_SEARCH]
HIDE "C:\LDrawXtra\MyPrims\In Work"
SHOW "C:\LDrawXtra\MyParts\In Work"
SHOW <MODELDIR>
HIDE <LDRAWDIR>\BFC\P
HIDE <LDRAWDIR>\BFC\PARTS
HIDE <P>
SHOW <PARTS>
SHOW <MODELS>
SHOW <MODELS>\TEST
SHOW C:\LDrawXtra\MyParts\Done

What's the equivalent of the home directory for a Windows user?
Possibly "C:\Documents and Settings\username\ldraw.ini"?  How do you
find that.  I checked the environment on Win2K and it looks like I
can use %USERPROFILE%\ldraw.ini but I'm not sure about other versions
of Windows.

Don



Message has 2 Replies:
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
 
Hi Don, "Don Heyse" <dheyse@hotmail.spam....away.com> schrieb im Newsbeitrag news:Ht8vwM.ps2@lugnet.com... (...) <SNIP> > (...) Have you ever tried to pull out a variable under MS-Windows with a length of 500 characters? Or what would happen if the (...) (21 years ago, 17-Feb-04, to lugnet.cad.dev)
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
 
(...) Something similar (but probably not identical to) the above would have my vote (I'll explain below). I would clarify that if ldraw.ini can't be found in the user's home directory (aka the user profile directory), then the Windows directory (...) (21 years ago, 17-Feb-04, to lugnet.cad.dev)

Message is in Reply To:
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
 
"Don Heyse" <dheyse@hotmail.spam....away.com> schrieb im Newsbeitrag news:Ht6s7G.1792@lugnet.com... (...) major (...) ini (...) user (...) There is another disadvantage of this methode. Environment variables are very system dependend and usualy are (...) (21 years ago, 17-Feb-04, to lugnet.cad.dev)

132 Messages in This Thread:
(Inline display suppressed due to large size. Click Dots below to view.)
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