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 / 11050
11049  |  11051
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
LDSwitch Sample #1: Do/Undo
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 23 Feb 2010 16:30:07 GMT
Viewed: 
22283 times
  
Don't know if you prefer to make input here or at SourceForge, so I crosspost.
Please give feedback where you like, here or at SF.

Here's the first sample LDraw code snippet. Set the value of the variable
Rev028_Changes to Do or Undo, run the planned LDSwitch app in automatic mode,
and the app will comment out the lines in the other CASE.

In manual mode, the app will find the switches and generate menus where the user
can switch cases, later on maybe add new cases.


////////////////////// DO MODE //////////////////////

0 Town Section 2 West 1 South...
0 Name: Town-2-1.ldr
0 Author: John VanZwieten
0 Unofficial Datsville Town Sub-Model
0 Parent: Town.ldr

0 !LDSWITCH DEFINE Rev028_Changes Do

0 // ( LDraw code... )

0 !LDSWITCH SWITCH Rev028_Changes
0 !LDSWITCH CASE Do
1 2 1920 0 -3840 1 0 0 0 1 0 0 0 1 3811.dat
1 2 1920 0 -4480 1 0 0 0 1 0 0 0 1 3811.dat
0 REM Railroad Tracks instead of Crossing #2
1 7 1280 -8 -4480 0 0 -1 0 1 0 1 0 0 rjvtks2.ldr
1 7 1600 -8 -4480 0 0 -1 0 1 0 1 0 0 rjvtks2.ldr
1 0 1920 0 -5120  1 0 0  0 1 0  0 0 1 2359p01.dat
0 !LDSWITCH CASE Undo
0 0 REM Railroad Crossing #2
0 1 7 1920 0 -4480 0 0 -1 0 1 0 1 0 0 rjvtkx.ldr
0 1 0 1920 0 -3840 0 0 -1 0 1 0 1 0 0 609.dat
0 1 0 1920 0 -5120 1 0 0 0 1 0 0 0 1 607p01.dat
0 !LDSWITCH END

0 REM Railroad Crossing #1
1 0 0 0 -4480 0 0 -1 0 1 0 1 0 0 rjvtkx.ldr

0 // ( More LDraw code... )

0 // ( EOF )



////////////////////// UNDO MODE //////////////////////

0 Town Section 2 West 1 South...
0 Name: Town-2-1.ldr
0 Author: John VanZwieten
0 Unofficial Datsville Town Sub-Model
0 Parent: Town.ldr

0 !LDSWITCH DEFINE Rev028_Changes Undo

0 // ( LDraw code... )

0 !LDSWITCH SWITCH Rev028_Changes
0 !LDSWITCH CASE Do
0 1 2 1920 0 -3840 1 0 0 0 1 0 0 0 1 3811.dat
0 1 2 1920 0 -4480 1 0 0 0 1 0 0 0 1 3811.dat
0 0 REM Railroad Tracks instead of Crossing #2
0 1 7 1280 -8 -4480 0 0 -1 0 1 0 1 0 0 rjvtks2.ldr
0 1 7 1600 -8 -4480 0 0 -1 0 1 0 1 0 0 rjvtks2.ldr
0 1 0 1920 0 -5120  1 0 0  0 1 0  0 0 1 2359p01.dat
0 !LDSWITCH CASE Undo
0 REM Railroad Crossing #2
1 7 1920 0 -4480 0 0 -1 0 1 0 1 0 0 rjvtkx.ldr
1 0 1920 0 -3840 0 0 -1 0 1 0 1 0 0 609.dat
1 0 1920 0 -5120 1 0 0 0 1 0 0 0 1 607p01.dat
0 !LDSWITCH END

0 REM Railroad Crossing #1
1 0 0 0 -4480 0 0 -1 0 1 0 1 0 0 rjvtkx.ldr

0 // ( More LDraw code... )

0 // ( EOF )



Message is in Reply To:
  LDSwitch Project on SourceForge
 
(...) I've just registered myself and my first project at SourceForge: (URL) to join or just input! /Tore (15 years ago, 23-Feb-10, to lugnet.cad.dev)

3 Messages in This Thread:

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

Custom Search

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