erfajo / OrchidForDynamo

This repository contains the content of the Orchid package for Dynamo
http://www.dynamobim.com
Other
99 stars 55 forks source link

FamilyDocument.Current doesn't work #189

Closed artem-marinin closed 6 months ago

artem-marinin commented 1 year ago

Revit: 23.1.1.24 Dynamo Core: 2.16.1.2727 Dynamo Revit: 2.16.1.6510 Orchid: 216.3.0.5797

Hi there! My aim is to add shared parameters to families. I do it in according to Gavin Crump YouTube tutorial.

I want to use the "FamilyDocument.Current" node, but it doesn't work. A warning appears: image

Dynamo also alerts that failed to load library "OrchidIB.dll" and failed to load "IFCExporterUIOverride": image

Please, help to fix the "FamilyDocument.Current" node.

Best regards, Artem

erfajo commented 1 year ago

Try to update to the release from today please... 5805 I am affraid the the version you have downloaded was one of them where I made an error...

when I was making some new nodes I made an error, you can follow the process here https://github.com/erfajo/OrchidForDynamo/issues/184

and here https://github.com/erfajo/OrchidForDynamo/issues/188

Should be solved by now :-)

artem-marinin commented 1 year ago

Hi @erfajo, Thank you for the quick reply! I have updated the Orchid to 5805 release. image

But the "FamilyDocument.Current" node still doesn't work - the same warning as I attached above (0x00000007/u01 error). I restarted my PC, created a new family file and a new dynamo file - nothing changes. Just as extra information, I use Windows 10 Pro, version 22H2, build 19045.2604. I have learned the issues #184 and #188 you shared, but I didn't find anything which can help in my case. What could I miss?

Best regards, Artem

erfajo commented 1 year ago

How you are able to catch the 0x00000007/u01 error is strange...

It makes no sense... But I Will try to see if Windows 10 Pro, version 22H2, build 19045.2604 is supported by the Microsoft.Windows.SDK.Contracts API. If not I am a bit lost...

I found something indicating I have a problem https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-enhance image

artem-marinin commented 1 year ago

Do I understand you correct, are you going to check/update your source code? Or can I update something on my side?

erfajo commented 1 year ago

I need to check on my source code first... It is the first time I have starting using the windows API, so I might have missed something important... But it will take a day or so before I can return to you.

Will it be possible to do a teams meeting or something where I can see what goes on?

artem-marinin commented 1 year ago

Yes, MS Teams is OK. Just send me an invitation and write date and time in advance if it's possible, when you are ready. Many thanks!

erfajo commented 1 year ago

thanks, I will return... I have copied all info needed :-)

erfajo commented 1 year ago

Just one thing, do you have the JSON API installed somehow? I use the version that comes with the Dynamo Nuget package, and for 2.16 I believe it is 13.0.1 (and 8.0.3 for earlier versions of Dynamo). I know that JSON has been an issue before, and I do use JSON files for storing data. image

erfajo commented 1 year ago

I have now made a beta build, I would like you to test. I have included a check for json in it, so I can see if that should be the problem... and I have forced a new error code, so if you get that something is really wrong :-S image

artem-marinin commented 1 year ago

Hi Erik! I have tested the 5805-beta. The error remains. Is it OK that BETA_5805.exe unpacks nothing in C:\Users\%USERNAME%\AppData\Roaming\Dynamo\Dynamo Revit\2.16\packages? I have this question, because EXE-installers for your previous builds creates "Orchid" folder with files in this path. Now I'm looking for Dynamo Nuget package to install it. Thanks a lot for your time!

erfajo commented 1 year ago

You should not install the nuget package... it is only for developers. But if you have PyRevit it comes with a json that is different than dynamo... or it used to be so... but I dont know it for sure. ...and the installer is my bad. I am nearly never using my beta build setup, and I have forgotten that it has changed like anything else concerning +2.13 versions. I will make a new build, however, it will be new release (5806)

another test you could do is, changing your language to English or any other using latin characters... by doing that I will know if it is the character set that is a challenge. Then I know what I must focus on.

artem-marinin commented 1 year ago

Thanks for the notification regarding nuget package. I have installed PyRevit, change language on English in Revit and Windows. The error remains...:(((

artem-marinin commented 1 year ago

I have installed the 5806 build. The error remains. Also new notification has appeared: image But it might be caused by IronPython update, which I did during Clockwork package testing. By the way, the "CurrentFamilyType" node from Clockwork works fine. The similar Orchid node doesn't work as well as other Orchid nodes which reffers to current family or project file. In the same time, for example, the "Culture.Current" node from Orchid works good.

erfajo commented 1 year ago

aha... So the problem seems to be another package. try to move all other packages out of you packages, and then retry only with Orchid and the OOTB nodes.

The error you have gotten indicates that another package is shipped with the dynamo API, and this will go wrong... so while testing my package you will run into the problem, but that could also happen with other packages that are zero touch packages. Python based packages might also be hit, but that is much more difficult to see, since everything is handled at runtime and therefore much more problematic than zero touch packages.

artem-marinin commented 1 year ago

I have removed all other packages as you wrote. image Also I deleted all Addins from AppData\Roaming\Autodesk\Revit\Addins\2023. The error remains...

erfajo commented 1 year ago

and it is with english as language? ... can you send a screendump of the error?

and you dont have any other paths in you "node and package locations"? (can I have a screendump of that?)

artem-marinin commented 1 year ago

Yes, Windows and Revit was swiched on Enlglish language. Here is the error: image

I have paths for packages by default image

image

image Here are only dyf files.

I have free 40 minutes now. If you wish, I can show the error in MS Teams

erfajo commented 1 year ago

I cant do teams today, my first free slot will be tomorrow. thanks for the screendumps, all seems to be fine. BUT the error is the one I have forced true, the error 0x00000007/00u is invented by me and tells me that the problem is somewhere in the json part...

artem-marinin commented 1 year ago

OK, If you need extra info, let me, please. Tomorrow I will be busy, but I will be able to escape for 30 minutes Teams meeting around 16:10 Moscow time, if you need. Many thanks!

erfajo commented 1 year ago

it might be crazy, but I have tested if characters could be something... I made a new betabuild, could you try this out?

artem-marinin commented 1 year ago

Hi Erik! I have tested 5807 beta. Nothing news. The same error 0x00000007/00u.

erfajo commented 1 year ago

I really dont get it...

In my code it should throw errors for the windows API, for Json, and lastly for Cyrillic (or any other non Latin) letters... ending with the error code you have sent should not occur... I am beginning to reach the end for options... :-S

artem-marinin commented 1 year ago

I see it's hard to understand what's the reason. I think I should find other ways to get what I need. Anyway if I find out how to pass by the issue I will write here. If you have new Ideas, let me know please, and I will test them. Thanks a lot to you!

erfajo commented 1 year ago

I have uploaded yet another beta build... I hope this one will do it... however, if so it will give me other problems, but then I must deal with them subsequently. -->5808_beta

artem-marinin commented 1 year ago

Now I'm out of workplace till night. I'll test it ASAP. Thank you very much!

erfajo commented 1 year ago

Yesterday another user did report the same error as you, and the 5808_beta seemed to have fixed it, so I have removed it and uploaded new builds… if it still not solves your problem, then please report it asap.

Starting to use the windows API is a challenge, and your error is therefore important for me to fix, by now it is only bypassed. Will it be doable to make further tests where I continue making beta builds well-knowing that these might fail while testing which boundaries I hit?

Otherwise, if everything works I will close this issue, thank you for your report :-)

artem-marinin commented 1 year ago

Hej Erik! Sorry for the long reply, it's a pretty busy week. I have installed the last build (BETA_5809). Hooooray! It works!!! :) Thank you very much! If you need a help from my side, for example, for testing, contact me. I will try to help. The issue might be closed.

erfajo commented 1 year ago

the 5809 build should also work... the 5809_beta is solving some issues with Revit "filters" you can set... but the user who has the problem has now asked a function that can show all filters no matter how complex it is build... this is what I am working on with that beta :-)