YS
Yvette S. Hirth, CCP, CDP
Tue, May 5, 2015 3:31 PM
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
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
AD
Ari Diacou
Tue, May 5, 2015 5:08 PM
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@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@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
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@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@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
GW
G. Wade Johnson
Tue, May 5, 2015 6:33 PM
I use a real version control system for this (currently, git) But then,
I'm a programmer, so version control makes sense.
Every system I've used in the past with special names or strings built
in to the text has failed because of the extra, independent manual
process of updating it.
So I use a tool built for that purpose.
On Tue, 5 May 2015 13:08:05 -0400
Ari Diacou ari.diacou@gmail.com wrote:
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@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@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Doing nothing is very hard to do … you never know when you’re finished.
-- Leslie Nielsen
I use a real version control system for this (currently, git) But then,
I'm a programmer, so version control makes sense.
Every system I've used in the past with special names or strings built
in to the text has failed because of the extra, independent manual
process of updating it.
So I use a tool built for that purpose.
On Tue, 5 May 2015 13:08:05 -0400
Ari Diacou <ari.diacou@gmail.com> wrote:
> 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@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@lists.openscad.org
> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >
--
Doing nothing is very hard to do … you never know when you’re finished.
-- Leslie Nielsen
YS
Yvette S. Hirth, CCP, CDP
Tue, May 5, 2015 7:08 PM
On 05/05/2015 11:33 AM, G. Wade Johnson wrote:
I use a real version control system for this (currently, git) But then,
I'm a programmer, so version control makes sense.
well gee gosh, i've been a programmer since 1967, i.e., for 48 years,
and personally, i loathe version control systems.
Every system I've used in the past with special names or strings built
in to the text has failed because of the extra, independent manual
process of updating it.
which is what i'm trying to avoid.
So I use a tool built for that purpose.
you use the tool you want; i'll use the tool i want.
also, for ec/code stamping of large, complicated products with lots to
engineer, one could stomp the entire filename into a piece. can't do
that with version control.
yvette
On 05/05/2015 11:33 AM, G. Wade Johnson wrote:
> I use a real version control system for this (currently, git) But then,
> I'm a programmer, so version control makes sense.
well gee gosh, i've been a programmer since 1967, i.e., for 48 years,
and personally, i loathe version control systems.
> Every system I've used in the past with special names or strings built
> in to the text has failed because of the extra, independent manual
> process of updating it.
which is what i'm trying to avoid.
> So I use a tool built for that purpose.
you use the tool you want; i'll use the tool i want.
also, for ec/code stamping of large, complicated products with lots to
engineer, one could stomp the entire filename into a piece. can't do
that with version control.
yvette
MD
Michele Denber
Tue, May 5, 2015 7:21 PM
On 05-05-2015 3:08 PM, Yvette S. Hirth, CCP, CDP wrote:
On 05/05/2015 11:33 AM, G. Wade Johnson wrote:
I use a real version control system for this (currently, git) But then,
I'm a programmer, so version control makes sense.
well gee gosh, i've been a programmer since 1967, i.e., for 48 years,
and personally, i loathe version control systems.
Well you've got me beat by five years but I agree 100% with you. This
is just a bad idea that Openscad doesn't need.
- Michele
On 05-05-2015 3:08 PM, Yvette S. Hirth, CCP, CDP wrote:
> On 05/05/2015 11:33 AM, G. Wade Johnson wrote:
>
>> I use a real version control system for this (currently, git) But then,
>> I'm a programmer, so version control makes sense.
>
> well gee gosh, i've been a programmer since 1967, i.e., for 48 years,
> and personally, i loathe version control systems.
Well you've got me beat by five years but I agree 100% with you. This
is just a bad idea that Openscad doesn't need.
- Michele
GW
G. Wade Johnson
Tue, May 5, 2015 7:33 PM
On 05/05/2015 11:33 AM, G. Wade Johnson wrote:
I use a real version control system for this (currently, git) But
then, I'm a programmer, so version control makes sense.
well gee gosh, i've been a programmer since 1967, i.e., for 48 years,
and personally, i loathe version control systems.
Sorry to hear that they don't work for you. I made the comment mostly
because not all OpenSCAD users are programmers and it has been an issue
before.
I meant it as an explanation for my usage, not to be condescending.
Every system I've used in the past with special names or strings
built in to the text has failed because of the extra, independent
manual process of updating it.
which is what i'm trying to avoid.
So I use a tool built for that purpose.
you use the tool you want; i'll use the tool i want.
also, for ec/code stamping of large, complicated products with lots
to engineer, one could stomp the entire filename into a piece. can't
do that with version control.
I just hate working with systems where there are a whole bunch of
copies of the same code with slightly different filenames. But, if it
works for you, I'm happy it works.
G. Wade
--
A 'language' is a dialect with an army.
On Tue, 05 May 2015 12:08:29 -0700
"Yvette S. Hirth, CCP, CDP" <yvette@dbtgroup.com> wrote:
> On 05/05/2015 11:33 AM, G. Wade Johnson wrote:
>
> > I use a real version control system for this (currently, git) But
> > then, I'm a programmer, so version control makes sense.
>
> well gee gosh, i've been a programmer since 1967, i.e., for 48 years,
> and personally, i loathe version control systems.
Sorry to hear that they don't work for you. I made the comment mostly
because not all OpenSCAD users are programmers and it has been an issue
before.
I meant it as an explanation for my usage, not to be condescending.
> > Every system I've used in the past with special names or strings
> > built in to the text has failed because of the extra, independent
> > manual process of updating it.
>
> which is what i'm trying to avoid.
>
> > So I use a tool built for that purpose.
>
> you use the tool you want; i'll use the tool i want.
>
> also, for ec/code stamping of large, complicated products with lots
> to engineer, one could stomp the entire filename into a piece. can't
> do that with version control.
I just hate working with systems where there are a whole bunch of
copies of the same code with slightly different filenames. But, if it
works for you, I'm happy it works.
G. Wade
> yvette
>
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
A 'language' is a dialect with an army.
YS
Yvette S. Hirth, CCP, CDP
Tue, May 5, 2015 9:09 PM
On 05/05/2015 12:33 PM, G. Wade Johnson wrote:
I just hate working with systems where there are a whole bunch of
copies of the same code with slightly different filenames. But, if it
works for you, I'm happy it works.
thank you for that!
yvette
On 05/05/2015 12:33 PM, G. Wade Johnson wrote:
> I just hate working with systems where there are a whole bunch of
> copies of the same code with slightly different filenames. But, if it
> works for you, I'm happy it works.
thank you for that!
yvette
J
jellsworth
Tue, May 5, 2015 10:31 PM
My opinion(s), fwiw:
-
I love the idea of stamping a version label directly into the 3d model,
even though this would only make sense for a few types of models. The
filename-variable suggestion is nice, simple way to do it.
-
Yes, a real version control system is a powerful way to manage your files.
If that works for you, use it! If not, don't!
-
The problem here is that this clever approach leaves the version control
users out in the cold, if they can only stamp their models based on
filename.
-
Maybe there is a way to also accommodate the leading version control
systems, or at least git. Now that would be a productive discussion!
Regards,
Jerry E
--
View this message in context: http://forum.openscad.org/new-Special-Variable-tp12579p12586.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
My opinion(s), fwiw:
* I love the idea of stamping a version label directly into the 3d model,
even though this would only make sense for a few types of models. The
filename-variable suggestion is nice, simple way to do it.
* Yes, a real version control system is a powerful way to manage your files.
If that works for you, use it! If not, don't!
* The problem here is that this clever approach leaves the version control
users out in the cold, if they can only stamp their models based on
filename.
* Maybe there is a way to also accommodate the leading version control
systems, or at least git. Now that would be a productive discussion!
Regards,
Jerry E
--
View this message in context: http://forum.openscad.org/new-Special-Variable-tp12579p12586.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Tue, May 5, 2015 11:25 PM
Issue 380 https://github.com/openscad/openscad/issues/380
Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.
View this message in context: http://forum.openscad.org/new-Special-Variable-tp12579p12587.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Issue 380 <https://github.com/openscad/openscad/issues/380>
-----
Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/
--
View this message in context: http://forum.openscad.org/new-Special-Variable-tp12579p12587.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
LT
Len Trigg
Wed, May 6, 2015 12:39 AM
- The problem here is that this clever approach leaves the version control
users out in the cold, if they can only stamp their models based on
filename.
You can pass variables in from outside by using the -D parameter to
openscad. Yvette could thus use a workaround wrapper script when launching
openscad that sets a variable to the current filename. In linux this would
look something like:
if [ "$1" ]; then
openscad -D fileName=$(basename $1) $1
else
openscad
fi
Similarly, if you have your files under version control you could
substitute the output of git describe as your version tag.
Cheers,
Len.
On 6 May 2015 at 10:31, jellsworth <jerry.ellsworth@gmail.com> wrote:
> * The problem here is that this clever approach leaves the version control
> users out in the cold, if they can only stamp their models based on
> filename.
>
You can pass variables in from outside by using the -D parameter to
openscad. Yvette could thus use a workaround wrapper script when launching
openscad that sets a variable to the current filename. In linux this would
look something like:
if [ "$1" ]; then
openscad -D fileName=$(basename $1) $1
else
openscad
fi
Similarly, if you have your files under version control you could
substitute the output of git describe as your version tag.
Cheers,
Len.