As requested by me, there have been some updates to NetCoreBlockly. The author is quite responsive to requests.

Updates

  1. New Version of Andrei Ignat’s NetCoreBlockly 8.2024.503.745
  2. The overrides for the API access blocks have been removed in the latest version of NetCoreBlockly. See here Less clutter! :)
  3. Can add comments to Blockly code. See here! Useful. :)
  4. Can copy functions to a file that gets loaded at startup like a library. See here. Nice!:)
  5. C Style operators added. A set block that takes a numerical variable and applies an operation to it and returns the result directly to it. See here. Subject to a couple of further suggestions.

1. New Version of NetCoreBlockly

  • Install/upgrade to the latest version via Nuget.
  • All the following assume that the upgrade has been actioned.

2. Overrides removal

No action required except to upgrade as in 1. Previously saved API blocks now don’t have the overrides when reloaded.

3. Add Comments

  • Go to Advanced–>HTML–>meta
  • Click on comment, place the block in your code and enter the comment.
  • Note: Is ignored when the app runs.

Blockly Comments

4. Save functions as a Library

See the previous post wrt creating and using functions in Blockly.

  • Create the folder:
SoftataWebAPI\wwwroot\BlocklyAutomation\assets\loadAtStartup
  • Create text file in that folder called:
customCategories.txt
  • Made sure it was being copied to the built output
  • Inserted code as previous (WITHOUT the XML monikers)!
  • Ran Blockly and could access any functions in that file via CategoriesLoaded.
  • Functions then available under Basic–>Functions
  • Functions renamed if already existing
  • Can then reuse functions.

5. C Style Operators

  • Go to Advanced–>other and select the set block: Blockly C Style OPerator
  • In the left holder get and drag a variable block.
  • Choose the operator in the middle. (Dropdown menu)
  • Insert the value to be operator by.

 TopicSubtopic
  Next: > Arduino
   
 This Category Links 
Category:Softata Index:Softata
  Next: > Softata
<  Prev:   Softata