Open LuisaCPBR opened 4 years ago
@LuisaCPBR you mentioned you got the crash after you disconnected? Which node did you try to disconnect?
Yes, after I disconnected "ʳʰʸᵗʰᵐ|Applications.OpenDocumentFile" Dynamo crashed
@johnpierson any insights here or is it a Dynamo issue you think?
Short Version: Primarily a Dynamo issue regarding wrappers for Documents.
Long Version:
This is documented here, https://github.com/DynamoDS/DynamoRevit/issues/2582 and referenced in the Rhythm GitHub page here, https://github.com/johnpierson/RhythmForDynamo#known-issues.
Basically, you need to run in manual run mode and once you close a background document, you must close and reopen Dynamo for the next run.
Background opening documents is something Dynamo was never meant to do, but I found out that it mostly works if you are careful.
For quite some time I have been considering dropping those nodes though because the Dynamo team doesn't seem to want to prioritize giving Autodesk.Revit.DB.Document
any element wrappers. 😞
@LuisaCPBR I would say to make sure you are in manual run mode or use Dynamo player for those workflows.
@ZiyunShang @AndyDu1985 - Is it possible to do a pass on Element Wrappers
as future DynamoRevit work? There are a bunch missing inside of Dynamo, including the Document
class that @johnpierson mentions above.
Elements are those that derived from Autodesk.Revit.DB.Element,
but Document
is not derived from it, so they are different. I will take a look at the Element Wrappers to see if it can also works on Document
.
@LuisaCPBR I was unable to reproduce the crash with your graph. Of course, I don't have the necessary input files you're using in your graph but I tried it with an arbitrary .rvt file and was unable to reproduce. It would help if you or @johnpierson could give clearer reproducible steps so that we can add guards in the Dynamo VM to avoid the crash. Thanks!
@aparajit-pratap
Applications.OpenDocumentFile
.
Applications.OpenDocumentFile
nodeApplications.CloseDocument
Applications.OpenDocumentFile
and press runThe stack trace I was able to reproduce using the steps above seems to be slightly different from the one from @LuisaCPBR. In any case, it seems that there is little that can be done on the Dynamo side. I would defer to the Dynamo 4 Revit team to fix at their end as the exception is thrown from Revit functions. @Amoursol could you move this issue to DynamoRevit repo?
@aparajit-pratap - Indeed, we can send across to D4R.
In this case, seems the Document is become invalid. Could you check if the exception can be catched? @ZiyunShang
FWIW. these nodes will be removed from a very soon Rhythm release.
the message folks will receive for a while
I simply cannot support them any longer without any help from the Dynamo team on this. It is unfortunate for the community to not have these kinds of nodes available in Rhythm anymore. But the overhead is far too much for me to absorb. It has become increasingly apparent that these kinds of interactions (background documents) are not a priority. My main suggestion to any user who is reading this is to revert to just using one python node for the entire workflow with open/close embedded within it as I mentioned here
Issue Description
Please fill in the following information to help us reproduce the issue:
I was basically trying to set project information parameters without opening the Revit Files
Like this: https://forum.dynamobim.com/t/open-files-from-a-directory-and-change-a-parameter-then-re-save-the-file/31326/9
What did you do?
after I disconected
Batch Set project parameters on Backgroud.zip
"ʳʰʸᵗʰᵐ|Applications.OpenDocumentFile" Dynamo crashed
What did you expect to see?
I expected to be able to change the project information parameters without having to open each and every file
What did you see instead?
(Fill in here)
What packages or external references (if any) were used?
Orchid GeniusLoci Rhythm BumbleBee
Stack Trace