Problem with WolframModel function in a Package

Posted 1 year ago
2139 Views
|
6 Replies
|
0 Total Likes
|
 I started a toolbox for the Wolfram Physics Project. This was first implemented as a Module in Cloud Access Basic because I'am a beginner in Wolfram Language. Everything was fine in the Module form. Then I transformed my first function to a Package in Wolfram|One. The function "documentrule" (I know that I have to use Uppercase characters in the naming) just displays some aspects of a rule.As you can see in the attached Notebook the evaluation of the Initialization cell is Ok. But then I have some erros when the second WolframModel function is evaluated when the "documentrule" function is called. I guess that there is some problem with the arguments evaluation at "[r, Automatic, 3]". In the previous line WolframModel with only one argument is ok.The other 2 similar lines are commented to reduce the clutter, they have the same error.Is there someone who can help me?
6 Replies
Sort By:
Posted 1 year ago
 I tried further on and came to following conclusion: There is a difference in evaluation of WolframModel in the Cloud Access and Desktop of the same Notebook. Is there some specific setup necessity for Desktop? Cloud processing is ok: Processed in Desktop, not ok:
Posted 1 year ago
 Hi Chris,It worked for me $Version (* 12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020) *) wm = ResourceFunction["WolframModel"] wm[rulexx, Automatic, 3]["StatesPlotsList", VertexLabels -> Automatic]  Answer Posted 1 year ago  Thanks for the hint. Package is working now.But I'm still wondering why it's not working with the short hand expression of the WolframModel function. What is the meaning of the first version of the function (SetReplaceWolframModel)? Answer Posted 1 year ago  Hi Chris, I encountered the same issue last week under similar circumstances. With a bit of tinkering I was able to "Uniconize" the short hand expression and got..... ResourceFunction[ ResourceObject[ Association["Name" -> "WolframModel", "ShortName" -> "WolframModel", "UUID" -> "f6eb4e01-15fd-4c52-857b-52f627495c74", "ResourceType" -> "Function", "Version" -> "4.0.0", "Description" -> "Generate evolutions of Wolfram model systems", "RepositoryLocation" -> URL["https://www.wolframcloud.com/objects/resourcesystem/api/1.0"]\ , "SymbolName" -> "FunctionRepository$b6b79aa4e83b4f46b8590449b5d727f9\ WolframModel", "FunctionLocation" -> CloudObject[ "https://www.wolframcloud.com/obj/01613fcc-8070-4284-8425-\ 3c7af256a88f"]], ResourceSystemBase -> Automatic]] `So it appears that this version is tied to the cloud and probably requires above basic access to work with desktop applications. In my case, I ended up clicking on documentation for those functions which pulled them up in a browser and used copy/paste which gives a regular text based command. Hopefully, this answers your question.Anton