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 / 8682
8681  |  8683
Subject: 
Re: Embedded language support in LPub
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 8 Apr 2003 17:47:20 GMT
Viewed: 
656 times
  
"Kevin L. Clague" <kevin_clague@yahoo.com> wrote in message
news:HD1BFD.1D64@lugnet.com...
Dan and Mike,

<snip>

Any feedback on what I outlined for scripting interface and such?

Kevin

It looks like you have all of the ones I can think of.  Being able to
control all of the settings that are available from the GUI is top of the
list.  It can actually eliminate the need for the LPub config file as these
settings could (and probably should) be saved in the same syntax as the
script is written in.

Would it also be possible to access the names of the generated files?

There was a recent discussion on controlling the background color for sub
models.  Knowing where a model is in the hierarchy could allow control over
the background color during image generation.

I might do something like this:

##  Get the list of models in the MPD file

set models [ lpubModelNames ]

##  Loop through the models, generating instruction images
##  with a different color background depending on the level
##  in the MPD hierarchy.

foreach model $models {

    ##  Determine the level in the model hierarchy and
    ##  set the background color accordingly.

    set hierarchyLevel [ lpubGetHierarchyLevel $model ]

    switch $hierarchyLevel {
        case 1 {
            set lpubBGColor "#A0A0A0"
        }
        case 2 {
            set lpubBGColor "#0A0A0A"
        }
        case 3 {
            setlpubBGColor "#FFAA00"
        }
        default {
            setlpubBGColor "#000000"
        }
    }

    ##  Generate instructions images

    lpubGeneateInstructionImages $model
}


Hope this helps.

Mike


--
Mike Walsh - mike_walsh at mindspring.com
http://www.ncltc.cc - North Carolina LEGO Train Club
http://www.carolinatrainbuilders.com - Carolina Train Builders
http://www.bricklink.com/store.asp?p=mpw - CTB/Brick Depot



Message has 1 Reply:
  Re: Embedded language support in LPub
 
(...) I disagree. (...) Yes. I can see the need for the name of the generated file at each post processing step. Did you want a list of *all* the files generated for a given entire model as well? (...) Good. This is the kind of stuff I envisioned (...) (21 years ago, 10-Apr-03, to lugnet.cad.dev)

Message is in Reply To:
  Re: Embedded language support in LPub
 
Dan and Mike, <snip> Any feedback on what I outlined for scripting interface and such? Kevin (21 years ago, 8-Apr-03, to lugnet.cad.dev)

31 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