erfajo / OrchidForDynamo

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

An Orchid related error of [FamilyParameter.SetValue]node #231

Closed HLDoukeishin closed 7 months ago

HLDoukeishin commented 7 months ago

Revit, Dynamo and Orchid version

Revit: 2021 Dynamo: 2.6.2.18430 Orchid: Orchid_206_Revit

The issue

I tried to create multiple family types and assign parameters to them, but there is an error displayed. Why is that? Do I need a node to convert a list into a value?

The error said: “Warning: The FamilyParameterSetValue operation has failed. No appropriate resources were found for the specified culture or neutral culture. Please ensure that “Orchid.Notifications.OrchidBase.resources” is correctly embedded, linked to the assembly “OrchidRB” at runtime, or that the necessary satellite assemblies are loaded and fully signed.”

(The"error" is expressed in Japanese, I used Google Translate. )

PWP_Add_typeall_TEST_2024-02-05_02-26-35

Using the [FamilyType.Create] node allows adding new types to a family, and [SetValue] is used to match parameters with the types. But it can only add one type at a time. Is there a way to create multiple types at the same time and correspond them with the relevant parameters?

dfa1da8f3d5b92446b93f7fc560f7d1b1fe9657b

I'm still a beginner, so I would greatly appreciate it if someone could tell me the solution to the problem. Thank you.

erfajo commented 7 months ago

Thanks for your report,

I am nearly 100% sure that this is a bug, since I have never had any reports from Japan before. However, I would recon that other Asian languages that also use different letters than Latin should cause problems!? I have had issues with Russian and Greek language, but not with the FamilyParameter.SetValue node.

So I have to check what the problem is and how I can fix it. I am afraid that it will take some time since I have to dig into this problem. Could you upload the graph, please? You simply add “.txt” as an extra extension, and you can upload it.

Lastly, let me give you some hints. When you take snaps of your graphs, then zoom into a few nodes, and then use the camera. It will automatically take a snap of the entire graph but in a much better resolution. And yes, you hopefully noticed that I used the notation GRAPH, not the bad slang word script. https://erfajo.blogspot.com/2019/03/graphs.html

HLDoukeishin commented 7 months ago

Hello erfajo Thank you for your response.

I have an idea. If I set Revit, file names, and save paths to English, could that possibly avoid the occurrence of this bug? Additionally, I will try the method you mentioned to re-upload the graphs.By thy way the snap of the graph is a".png". Do I need to change the file extension to ".txt" before upload it?

HLDoukeishin commented 7 months ago

PWP_Add_typeall_TEST_2024-02-06_02-18-23 txt

erfajo commented 7 months ago

It is the "dyn" graph file I mean (eg. graph.dyn.txt). By uploading that, I don't have to recreate anything, and I would like to see how Japanese characters are being handled.

I am sure that turning the graph into English will do the job, but I would like to see if I can solve this issue since non-Latin characters should also be doable to use.

Lastly, I can see many places where you can make this graph much simpler and much faster. You have many data retrivings there is the same. You should only retrieve data once and sort what you need for the individual data processing. I will fix them as well :-)

HLDoukeishin commented 7 months ago

PWP_Add_typeall_TEST.dyn.txt

Here it is, hoping it will be helpful. I am a beginner in Dynamo, and there are many things I don't understand yet. I really appreciate it if you can help me modify my graph. Thanks again for your guidance.

erfajo commented 7 months ago

could I also have the Excel file, you might need to add ".txt" to that as well (eg. excelfile.xlsx.txt), I can see that you also have a family with the parameters created, can I have this as well? (+ .txt on the filename)

...and your graph has kept the Japanese characters, so now I can test it :-)

HLDoukeishin commented 7 months ago

Dynamoシミュレーション2.xlsx.txt

Here it is! Many thanks!

erfajo commented 7 months ago

...and the family :-)

HLDoukeishin commented 7 months ago

sorry! ST_窓下収納_Dynamo.rfa.txt

erfajo commented 7 months ago

Thanks, I will now test... but just to clarify.

You want to use the same family, where you create 1 type in a file, and then save that as 10 individual files!?

It would be doable to have 10 FamilyTypes in just one family. If it was me, I would prefer to have as few families as possible, holding all the FamilyTypes I need. Your way will give you a lot of maintenance.

erfajo commented 7 months ago

...just for the quick test, the node works as expected, it is your data handling/sorting that is the problem... I will try my best to understand what you goal is--from reading your graph--and then help you :-)

erfajo commented 7 months ago

I have now solved most of your problems, but I am afraid I don't know why you want to save the file more than once!?

My solution takes your open family, adds the types and parameter values from the Excel file, and then save the family. PWP_Add_typeall_TEST.dyn.txt image

HLDoukeishin commented 7 months ago

I'm sorry for the late reply. last night's work was extremely busy... As you mentioned, I want to have 10 FamilyTypes in one family.

Differently, I hope to control the number of created types: either having 10 types in one family file and saving each as one file, or having only 1 type in one family.

HLDoukeishin commented 7 months ago

Thank you for your generous assistance. I am currently understanding and learning from the graph you modified. By the way, I try to understand why did you say 'prefer to have as few families as possible'? Is that means if one family contains multiple types, saving it as one rfa. file can reduce a lot of maintenance?"

HLDoukeishin commented 7 months ago

キャプチャ

When I opened the modified .dyn graph, Dynamo prompted me that the version of Orchid is different.

I previously downloaded Orchid from the zipped folder on the Github website. Can you tell me where I can download version 2.6.7.6149? Or is it okay for me to continue using the current version?

HLDoukeishin commented 7 months ago

Hi erfajo,

I ran the graph you modified, successfully creating 10 types in the family, which is great!

However, the 'Document.SaveAs' node had an error and didn't automatically save as .rfa.

PWP_Add_typeall_FIXbyGitHub_2024-02-07_02-35-13

In my original graph, each time a new type was created, it would automatically save as a separate file according to the set path.

PWP_Add_type_2024-02-07_02-10-16

And this is the dyn. PWP_Add_type.dyn.txt

erfajo commented 7 months ago

That was a lot of posts :-) I will try to answer them in order.

First. Yes, I would try to keep my number of families as low as possible, however, not if the family will end up being too complex. It is a balance between file size, number of properties, and usage. On the other hand, if something is completely the same, then I surely would make more types of the family instead of many families with one type.

Second. The current build is 2.6.7.6131, and the one that can be downloaded in the common installer. The one you see is my internal build. I continuously make new functions or refactor older functions to a better performance. My package is being worked on continuously :-)

Third. Error on the SaveAs node… I will check it.

Fourth. As mentioned in the first answer, I would not go for that… but if you want to do that, it could be a good exercise for you to try to change the graph. However, I didn't do it, since that would demand a completely new way to do it.

erfajo commented 7 months ago

another thing... why does your name look like this in my outlook mail from github? image

HLDoukeishin commented 7 months ago

I am very surprised; that is not the name I set, and I am not sure why it is displayed like that.

This is the username I set. name

If this 'WHOWOULDTELLYOUYOUFOOL' is offensive to you, I sincerely apologize. This is my first time using this website to contact developers, and perhaps I made a mistake in my actions.

erfajo commented 7 months ago

LOL I didn't think it was towards me, I had an idea that you were asked to give an email address and you didn’t want to give your personal email… so you invented an email name saying “I don’t want to give you my informations” :-)

According to the "Save" node... You found a bug. I need to change that and upload a new installer asap. I will inform you when I have done that :-)

HLDoukeishin commented 7 months ago

I reset my personal information on GitHub, hoping it was successful.

erfajo commented 7 months ago

You did :-) image

...and I have uploaded a new common installer, that holds all four versions I support for Dynamo (2.6-2.19).

HLDoukeishin commented 7 months ago

A new installer! That's great news. Thanks again for the help. Answering my questions might not be within your job, but you still responded diligently, which is immensely helpful for a beginner like me!

erfajo commented 7 months ago

did it work? can I close the issue?

HLDoukeishin commented 7 months ago

Sorry, may I ask another question?

Is there a node in the Orchid package that allows both parameter and color settings? PWP_Add_typeall_20240213_2024-02-13_05-28-08

I try to use [FamilyParameter.SetLightPresetColor] node,but it doesn't work

HLDoukeishin commented 7 months ago

PWP_Add_typeall_20240213.dyn.txt

erfajo commented 7 months ago

Please create new issues if it is not related to the issue I hope is solved...