[OpenSCAD] new "Special Variable"?

Ari Diacou ari.diacou at gmail.com
Tue May 5 13:08:05 EDT 2015


I'm not sure about a special variable, but it would be great if there were
any kind of version control. Like one that would count how many times you
hit save, and another one that counted renders.

So each time I hit save and render, it would make a new version number.

e.g. if I have a file called widget, if I have saved it once, and rendered
6 times since that save, it would be automatically saved as e.g.
widget.v1.06 when I hit render. It would also be nice if you could choose
to compress the folder with all of these saves from OpenSCAD.

Or am I really just describing a program that could manage all of this for
me outside of OpenSCAD?

On Tue, May 5, 2015 at 11:31 AM, Yvette S. Hirth, CCP, CDP <
yvette at dbtgroup.com> wrote:

> hi,
>
> any way we can get the filename(s) being built stuffed into a special
> variable?
>
> like, say, $fileName?  or $fileNameArray?
>
> i don't know if you can build more than one input file at a time; all my
> .scad files are "one file per thing being built".  i do use <include> and
> <use>, but only one input file.  so if only one input file can be built,
> then $fileName is more appropriate; if multiple input files can be built,
> then $fileNameArray is more appropriate.
>
> yes?  non?  eh?
>
> rationale:
>
> in each piece i build i stomp an "Engineering Change" (ec) level, along
> with the version.
>
> e.g., a build file for ec0 might be named:  wondafulWidget_003.scad
>
> so i stomp "ec0_003" in the item being built; makes it easier to trace
> "what made this thing?" issues.
>
> now i have to manually change the write() that stomps the ec tag.  while
> i'm not complaining about the workload (!), nonetheless, i've forgotten to
> change the string in the write() several times when i do a "Save As".  ex:
> Save As "wondafulWidget_004.scad" has the item being built still stomped
> with "ec_003".  <big sigh>  a good waste of time, carbon, and ABS!
>
> with the $fileName special variable, i can substring to the version, glom
> the version into a variable, and stomp the variable.  that ends any
> confusion as to "what made what".
>
> thanks for listening!
> yvette
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20150505/57743fce/attachment-0002.html>


More information about the Discuss mailing list