Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancment: New Auto Naming Format Feature #51

Open
RAMilewski opened this issue Aug 21, 2023 · 1 comment
Open

Enhancment: New Auto Naming Format Feature #51

RAMilewski opened this issue Aug 21, 2023 · 1 comment

Comments

@RAMilewski
Copy link

Not entirely sure this is possible but....

It would be a huge help if it were possible to set the export file basename to the value of an OpenSCAD variable.

I frequently build projects with more than one part in the file and use the Customizer to select which one to render.

If I could set a $variable to the name of the part it would save a lot of renaming at export time.

@Antyos
Copy link
Owner

Antyos commented Aug 24, 2023

Yes, this has been a goal of mine to add since the beginning and I would love to have it as a part of the extension.

The way I have in mind for this to work is that there would be a file-level override for the export name format (autoNamingExport seemed like a good name at the time, but in hindsight is terrible) in a comment at the top of the file. Something like:

// exportName=cube${var:size}.${exportExtension}
size = 10;
cube(size);

I think this feature may require a language server to be implemented so that the extension can gain access to variable definitions, so that is my next goal. There have been talks of this in several other issues. It is probably worth restarting one of those issues back up or making a new one. I am currently busy with grad school, so I don't know when I will have time to work on this, but PRs are always welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants