SolveSpace Logo SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

(you are viewing a thread; or go back to list of threads)

Commandline batch file opperations or multi link level rebuilds (by Ryan)
Is there the ability to open, reload and save a slvs from the command line? Passing the file you want to open as the first argument opens it, and rebuilds it, but I haven't found anything that enables one to save it and exit so a script could repeat this process multiple times. Does solvespace save and exit if sent a certain signal?
If you could do this it would be fairly straight forward to script the rebuild of complicated and highly nested models. Suppose you have a part that goes into a sub assembly and that sub assembly goes into another assembly. Unless there is something I'm missing, currently if you change the part you would have to open reload and save the sub assembly to get the changes to ripple into the assembly. This gets very cumbersome when there are lots of layers. If one could command line this process it would be fairly easy to script the rebuild. Something as simple as starting the name of all sub assemblies with sub and running a foreach type loop on sub* could save considerable tedious mouse work at times. I'm more than willing to create and share a script to do this if it's possible and not already done. I just need to be pointed at the command line controls documentation.

Is there documentation on command line options or utilities I missed? Is there the ability to launch a script when solvespace is started or closed? How does solvespace handle inter process signals?


Thank you all who contribute so much for your time and effort it is greatly appreciated.
Sun Jan 23 2022, 02:36:06
(no subject) (by Ryan)
Ok, found answers to part of my questions. The command line interface has a different executable name solvespace-cli. The regenerate option does exactly what I'm after(solvespace-cli regenerate *.slvs). I think it has to run once for each nested assembly, but this could be a name listing thing.
Sun Jan 23 2022, 03:29:34
(no subject) (by Paul)
The challenge is that you need to check dependencies top-down and then do the regeneration bottom-up.

It might be nice if solvespace itself had code to do this, but one issue that makes it hard/awkward is that it doesn't (currently) have the ability to open more than one sketch at a time.
Sun Jan 23 2022, 09:33:38
(no subject) (by Ryan)
One of the things I like about solvespace is it deals nicely with multiple instantiations running on various parts of an assemble at the same time. Up untill recently this is how I was overcoming the nested rebuild issue. I would open each step separately and cycle through them rebuilding and saving. This method works ok to a point, but starts to get tedious and confusing as you exceed 4 nesting assemblies.

I agree it would be really nice to have the ability to completely rebuild an assembly that had multiple layers of nested assemblies from within solvespace. I think this can be accomplished via the command line interface, and subpart naming conventions. I have to clean up and reorganize a project area to adequately test this theory but will share my results when I get there.
Sun Jan 23 2022, 12:06:31
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2022 SolveSpace contributors. Most recent update June 2 2022.