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

Document.SaveAs currently has no capacity to support .rte documents #397

Closed
jake1108 opened this issue Jan 16, 2024 · 2 comments
Closed
Assignees

Comments

@jake1108
Copy link

What is the problem that needs solving?
I need the capacity to SaveAs a large number of .rvt documents into .rte for distribution. Currently, within the node the input "Path" is filtered through the codeblock:

path2 = String.Replace(path1,".rvt","");
String.Replace(path2,".rfa","");

This gives no capacity for processing .rte's as the only subsequent review of the document is whether it is a family doc or not.

How would you like to see it solved?
I have adjusted the script so that the codeblock manipulating the input path is removed, and instead, the processing is handled within the Python.

Changing:

if doc.IsFamilyDocument:
	path += '.rfa'
else:
	path += '.rvt'

To:

if doc.IsFamilyDocument and ".rvt" in path:
	path = path.replace('.rvt', ".rfa")
else:
	pass

This enables the user to dictate the file type using the ".extension" notation, overriding this only in the case of a user trying to save a familydoc as a project.

Describe alternatives you've considered
There are plenty of other ways to achieve the same outcome. I simply wish to have the capacity to save Revit templates directly from .rvt documents. So long as I have this I'm happy :D.

Additional context
(Please fill in if applicable. Add any other context or screenshots about the feature request here.)

@jake1108
Copy link
Author

jake1108 commented Jan 16, 2024

@albandechasteigner your Document SaveAs node behaves in the same way, in case you wanted to include this functionality also.

@andydandy74
Copy link
Owner

Solved for project and family templates by adding a new "Save as template" input

grafik

andydandy74 added a commit that referenced this issue Mar 13, 2024
andydandy74 added a commit that referenced this issue Mar 30, 2024
andydandy74 added a commit that referenced this issue May 11, 2024
@andydandy74 andydandy74 moved this to Done in Clockwork 2.12.0 Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants