LDPE 1.8.60 Released (!LPE CONST expressions)


!LPE CONST and subfiles
#6
(2022-07-10, 16:55)Cam's Bricks Wrote: Wow this is really cool! I really like the quick fix concept because at the end of the day I can make a template file, change the constants, then save as the new iteration. 

It would be cool to see this meta be added to other editors but that is awesome. 

I am not quite following the explanation of the subfile explanation. I think it is saying that the constants cannot be changed from the working file into a subfile?

For example:

Code:
Sub-file A
0 !LPE CONST height = 7

1 16 0 height 0 6 0 0 0 -height 0 0 0 6 box5.dat


Cannot be changed in a working file like this:
Code:
Working File
0 !LPE CONST height = 7

1 16 0 0 0 1 0 0 0 1 0 0 0 1 Sub-file A.dat

Is my understanding correct?

You can do something like:

Code:
Working File
0 !LPE CONST height = 7

1 16 0 0 0 1 0 0 0 1 0 0 0 1 Sub-file A.dat

Code:
Sub-file A
0 // No constant needed, because it is defined in the working file (!LPE CONST height = 7)
0 // But you can override the value if you like.

1 16 0 height 0 6 0 0 0 -height 0 0 0 6 box5.dat

Code:
Sub-file A
0 // Now the height would be 5 instead of 7
0 !LPE CONST height = 5

1 16 0 height 0 6 0 0 0 -height 0 0 0 6 box5.dat

Another elegant possibility is this:
Code:
Sub-file A
0 // Now you can quick fixing the declaration in the subfile, too.
0 !LPE CONST subheight = height

1 16 0 subheight 0 6 0 0 0 -subheight 0 0 0 6 box5.dat


Thanks! You described here one of the main benefits:
"I really like the quick fix concept because at the end of the day I can make a template file, change the constants, then save as the new iteration. "
Reply
« Next Oldest | Next Newest »



Messages In This Thread
!LPE CONST and subfiles - by Nils Schmidt - 2022-07-10, 17:47

Forum Jump:


Users browsing this thread: 2 Guest(s)