Closed djaus2 closed 2 weeks ago
I will make an example with custom categories ASAP
Update latest nuget.org/packages/NetCore2Blockly version 8.2024.503.745
Put a file named customCategories.txt
<category name='CategoriesLoaded'>
</category>
and inside put your blocks
Using version 8.2024.503.745
OK so have created app with simple function:
Downloaded that and extracted the function part of it:
<block type="procedures_defnoreturn" x="107" y="488">
...
...
</block>
I created a file in Downloads directory where DownloadBlocks saves to, called customCategories.txt. With the block code in it:
<category name='CategoriesLoaded'>
<block type="procedures_defnoreturn" x="107" y="488">
<field name="NAME">GetData</field>
<comment pinned="false" h="80" w="160">Print current Date-Time</comment>
<statement name="STACK">
<block type="text_print">
<value name="TEXT">
<block type="displayCurrentDate">
<field name="dateFormat">human</field>
</block>
</value>
</block>
</statement>
</block>
</category>
The "Category" isn't being loaded. ???
Also added <xml ..> and tags before and after the category tags with same result. Guessing issue might be where to place the file??
Sorry for not being clear The folder for the file is assets\loadAtStartup
For your case , make a folder named loadAtStartup in SoftataWebAPI\wwwroot\BlocklyAutomation\assets and put there the file
Thanks that all worked. :)
SoftataWebAPI\wwwroot\BlocklyAutomation\assets\loadAtStartup
customCategories.txt
All good now, thanks again. :)
Can we have a mechanism of saving a set of Blockly functions separate from the app so that they can reloaded into another app as a single entity.? eg