Giter Club home page Giter Club logo

Comments (6)

ignatandrei avatar ignatandrei commented on June 18, 2024 1

I will make an example with custom categories ASAP

from netcoreblockly.

djaus2 avatar djaus2 commented on June 18, 2024 1

Thanks that all worked. :)

  • Using version 8.2024.503.745
  • Created folder
SoftataWebAPI\wwwroot\BlocklyAutomation\assets\loadAtStartup
  • Created 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.

from netcoreblockly.

ignatandrei avatar ignatandrei commented on June 18, 2024

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

image

from netcoreblockly.

djaus2 avatar djaus2 commented on June 18, 2024

Using version 8.2024.503.745

OK so have created app with simple function:
image

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??

from netcoreblockly.

ignatandrei avatar ignatandrei commented on June 18, 2024

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

from netcoreblockly.

djaus2 avatar djaus2 commented on June 18, 2024

All good now, thanks again. :)

from netcoreblockly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.