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 / 9596
9595  |  9597
Subject: 
Re: LDRAWPREDIRS LDRAWPOSTDIRS - Summary please!
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 11 Mar 2004 22:54:43 GMT
Viewed: 
3419 times
  
In lugnet.cad.dev, Michael Lachmann wrote:
Ok I try and hope that I do not forget something here, all others please
correct me if i'm wrong - but no cheating!

The discussion is about finding a way to specify alternate directories to be
searched before, after or inbetween the standard ldraw directories. Each
directory has to be on a single line preseeded by optional keywords
indicating if you would like to see parts in this directory in a part view
(e.g. MLCad's Part-Preview) or not.
Another keyword will tell the programm if the directory specified is a
sub-directory of a standard one or not.

Here the general syntax:

The definition begins with

[LDrawSearch]

followed by one or more lines like

n = <VisibilityOption> [<PathKeyname>]Path

where n is a running nummber starting with 1 and counting up,
VisibilityOption currently is one of
    <SHOW> .... to display parts in this directory
    <HIDE> .... to use them when rendering a model only, but not to display
them a useable parts
    more options might follow

PathKeyname is one of the standard directories
    <LDRAWDIR>  is e.g. C:\LDRAW
    <MODELDIR>  is the current directory of your project or the directory
where the current loaded file is located.
    more paths might follow

As an expamle the ini section for the standard search path:
[LDrawSearch]
1 = <SHOW> <MODELDIR>
2 = <HIDE>    <LDRAWDIR>P
3 = <SHOW> <LDRAWDIR>Parts
4 = <SHOW> <LDRAWDIR>Models

Currently my code doesn't expect all the spaces above, but I'm open to that.
The LDrawSetup program that I'm also writing at the same time
can not preserve the spaces if you add or delete options,
so it will ruin any nice table formatting you have made in Notepad.
However, to support advanced users who are only going to use an editor
I guess we should allow spaces.

Also I currently use a \ in "2=<HIDE><LDRAWDIR>\P" because I have
always thought of it as variable substitution.
However, you could also consider <LDRAWDIR> as a flag (like <HIDE> is a flag)
saying that the following path is a subpath to LDRAWDIR.
In that case it makes sense to omit the \.
\ or / will appear anyway in the file and are not a problem to handle.
More comments on that?

Just one small question: will these parameters be put in ldraw.ini and/or • the
system's table  of environment variables? Or somewhere else, like in the
%LDrawBaseDir%? (Hopefully not the third option) Personally, I would • really
prefer ldraw.ini only. If an environment variable, is it portable to use • 8+
characters?

We suggested to have that in the ldraw.ini, but it might also be used in
environment variables and
in the registry as well - but I believe we said in the file now ... (not
sure anymore).

I support both env var and ini files.
Windows users will typically only use ini files, I guess.
I think it's portable to use 8+ characters for env vars.

Any another sillier question just to show my ignorance: Pre and post • stands for
before and after. In this case, before and after what? Before scanning the
default search path for LCad files I guess? If so, will it stop scanning • by the
first match?

You can insert your directories wherever you like, before, after or between
the standard lines.

Yes, originally I just suggested extra dirs before and after the usual search dirs.
However, with the current scheme you can rearrange the order of all dirs (usual and extras)
completely - though not advisable.
And the search will stop at first match like today. Eh, what else?

I'll post my current ideas of the API shortly
so you can have an idea of how to use the routines.
/Lars



Message has 1 Reply:
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - Summary please!
 
(...) [snip] (...) OK, so I'm a new guy in the ldraw dev community, but I figured if I don't say something now it'll never get considered. So please go gently on me. I don't know the full protocol you guys use to come up with these standers. But (...) (20 years ago, 13-Mar-04, to lugnet.cad.dev)

Message is in Reply To:
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - Summary please!
 
"Tore Eriksson" <tore.eriksson@mbox3...wipnet.se> schrieb im Newsbeitrag news:HuDDv0.1KDF@lugnet.com... (...) to (...) most (...) lead to? (...) Ok I try and hope that I do not forget something here, all others please correct me if i'm wrong - but (...) (20 years ago, 11-Mar-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