To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 12572
12571  |  12573
Subject: 
Re: Trouble creating building instructions using lpub and mpd file
Newsgroups: 
lugnet.cad, lugnet.cad.mlcad
Date: 
Sun, 10 Apr 2005 15:42:46 GMT
Viewed: 
9934 times
  
In lugnet.cad, Don Heyse wrote:
Hmmm, I'm not sure if this effort is actually making things more
compatible.

In lugnet.cad, Lars C. Hassing wrote:
In lugnet.cad, Kevin L. Clague wrote:
Using MLCad as a benchmark, the name with blanks is *not* enclosed
in quotes.  I use the remainder of the line, sans end of line as
the file name.

I just did a little testing myself.  MLCad seems to strip off any
whitespace (tabs and space characters) at the end of the line when
it grabs the filename.  Is that what you meant by "sans end of line"?
I'm not sure what happens if you actually manage to create a file
with trailing white space, something like "my file.ldr   ".

I'll do the same.


If the new L3P allows blanks in file names, I can easily remove the
check.  It is only in one place in the code.  Once removed, the
rest of the code is ready for blanks in file names.

I am currently going through the L3P code and I have now added support
for filenames with spaces, both in linetype 1 and in "0 FILE xxx".
It now uses the rest of the line as the filename.
It also accepts filenames in double-quotes.

Well, that's ok for l3p because it doesn't create any new ldr files.
But MLCad doesn't seem to accept filenames in double quotes.  (It
treats the quotes as part of the filename).  So what do I do if I
want to write a program that creates new ldraw files.  We now have
some programs that accept filenames in double-quotes and treat the
remainder of the line as comments.  We have some programs that accept
everything but trailing whitespace as the filename.  And we have some
other programs that try to do both.  It's still an incompatible mess.
How about an official recommendation from ldraw.org?

FWIW, I prefer the quotes because it's less ambiguous.  Consider the
possibility that you might want a meta command where the filename is
in the middle.  When you don't use the quotes you don't know where the
filename ends and the meta command picks up.  Kevin, I think this may
be a problem with the way you were planning on using the MLCAD group
command.

Hi Don,
  Nice post.

  GROUP commands are defined outside the LDraw spec, but I'd guess that the
naming issues are the same.  I just made a minor change to:

0 PLIST BEGIN SUB <file> // depricated
0 LPUB PLI BEGIN SUB <file>

This original version supports sub-model files within the working directory.

I now allow a variant format:

0 LPUB PLI BEGIN SUB <color> <file>

Where you can specify an alternate LDraw part (e.g. retracted pistons instead of
extended pistons.)  This part requires a color.  I put color first for two
reasons:

  1.  This is the same order specified in a type 1 text line.
  2.  It supports blanks in file names without the need for double quotes.

The only strike against double quotes is backward compatibility.  Isn't it too
late to make this a requirement?

Kevin



Anyhow, that's my 2 cents.  Have fun,

Don



Message has 1 Reply:
  Re: Trouble creating building instructions using lpub and mpd file
 
(...) Well, technically ldlite has been around since well before MLCad, and it supports the double quotes, but MLCad is more widely used. So I guess you could make that argument either way. (...) I only asked for a recommendation, not a requirement. (...) (19 years ago, 10-Apr-05, to lugnet.cad, lugnet.cad.mlcad)

Message is in Reply To:
  Re: Trouble creating building instructions using lpub and mpd file
 
Hmmm, I'm not sure if this effort is actually making things more compatible. (...) I just did a little testing myself. MLCad seems to strip off any whitespace (tabs and space characters) at the end of the line when it grabs the filename. Is that (...) (19 years ago, 10-Apr-05, to lugnet.cad, lugnet.cad.mlcad)

17 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