How to modify a custom block

Modifying Example:

pyramidtohouse2.gif

 

Frequently Asked Questions:

What are the primary scenarios when editing Custom Blocks?

There are 4 primary scenarios when editing Custom Blocks, each one will show a different pop-up window when the BACK button is selected.

1. Update (no inputs/output change) - the most common scenario that occurs when a change is made to a Custom Block that does not modify its inputs or output or is a name change.

mceclip1.png

    • Update - (Recommended) Accept the changes made to all instances of Example within the main notebook.
    • Discard - Discard the changes we made in Example.
    • Cancel - Ignore the changes. This will store the unsaved changes of Example that you can apply later through the Imported Blocks menu.

2. Add to Notebook (inputs/output change) - the scenario when a Custom Block’s inputs or outputs are changed. You need to add it to the notebook.

mceclip2.png

    1. Add to Notebook - (Recommended) Add the Custom Block to the notebook as a new instance. From there, you will likely need to replace your old Example instances with this new Example instance.
    2. Discard - Discard the changes we made in Example.
    3. Cancel - Ignore the changes. This will store our unsaved changes of Example that we can apply later through the Imported Blocks menu.

3. Manage (nested change) - the scenario that occurs when you open a Custom Block from the Imported Blocks menu that is more than a single level deep in the Custom Block hierarchy tree and go back to the main notebook.

mceclip4.png

    1. Manage Blocks - (Recommended) Opens up the Imported Blocks menu where you can manually manage your changes. You will have to open up the Custom Block that was 1 level higher in the Custom Block hierarchy tree that contains the nested Custom Block and apply your edits there. Continue working your way back up the Custom Block hierarchy tree until you reach the main notebook level and apply your edits.
    2. Discard - Discard the changes we made in Example.
    3. Cancel - Ignore the changes. This will store our unsaved changes of Example that we can apply later through the Imported Blocks menu.

4. Invalid - the scenario that occurs when a Custom Block has no inputs or output.

mceclip3.png

    1. Go Back - (Recommended) Reopens the Custom Block back up where you can proceed to fix the errors.
    2. Discard - Discard the changes we made in Example.
    3. Cancel - Ignore the changes. This will store our unsaved changes of Example that we can apply later through the Imported Blocks menu.

 

Back to top

Imported Blocks Menu Indicators

Labeled_CB_Changes.JPG

The four important indicators are described in detail below:

1. Unsaved Blocks - This refers to the yellow coloration of the box. The number inside the box refers to the total number of imported blocks. The yellow coloration indicates that at least one block is unsaved.

2. Dependent Blocks Indicator - The red circle means that dependent blocks have changes. If the block is collapsed, click the chevron to see which dependent blocks have changes. To modify dependent blocks within this it, right-click and select "Open", then proceed to update blocks within it.

3. Locally Edited Block Indicator - The yellow circle means a new locally edited block is available. To update this block with the locally edited block, right-click on this block and select "Update".

4. Unapplied Instance Indicator - When the "Edited Blocks" text is yellow, this indicates that a new instance of a custom block exists, but is unapplied.

 

Back to top

Will my Custom Blocks changes be applied outside my file?

Once a Custom Block is imported into a file, it becomes internalized to that file. Any changes made will be within the context of that file but not reflected externally. Please export Custom Block to a directory to share or update any that were imported and edited within a file.

 

Back to top

Will my Custom Blocks changes be applied to all instances within my file?

Any changes made to a Custom Block within a file will be applied to all instances of the Custom Block (including nested Custom Blocks, Custom Blocks within Custom Blocks) in your file.

 

Back to top

Why can’t I see sections in my Custom Blocks?

Before version 3.31, you couldn’t view a Custom Block within a file. To open it, you had to open it in a different instance of nTop. Now you can view and edit a Custom Block within a single file. However, for Custom Blocks imported into files before version 3.31 - you’ll need to re-import them to view the sections. Section information will be available for any Custom Blocks imported or modified in version 3.31 and after.

 

Back to top

Why can’t I see the last modified date in my Custom Blocks?

Similar to the Sections information above, nTop was not tracking the “last modified date” information of Custom Blocks before version 3.31. For Custom Blocks imported into files before version 3.31 - you’ll need to re-import them for nTop to track and display the last modified date, activated by hovering over the Custom Block line in the Imported Blocks menu. For any Custom Blocks imported or modified in version 3.31, and after, the last modified date will be available.

 

Back to top

What does the version number mean?

Whenever a Custom Block is edited within a file, we automatically increment the block version. This process is shown below.

Untitled_Project.gif

 

Back to top

What is the Custom Block hierarchy tree?

The Custom Block hierarchy tree shows in the Imported Blocks menu. Every Custom Block that contains Custom Blocks within it, nested Custom Blocks, will have a chevron that you can expand/collapse to show the nested Custom Blocks. If a Custom Block does not have a chevron, it does not contain any nested Custom Blocks. 

In the below example, “Pyramid” contains “Block Metadata,” which is a standalone Custom Block, and “Plane from 3 Points”, which contains “_Checkbox Control” and another instance of “Block Metadata” in it.

custom_block_tree.png

 

Back to top

Can I make changes to nested Custom Blocks?

Nested Custom Blocks, Custom Blocks within Custom Blocks, can be viewed and edited within a file. To edit them, we recommend opening each Custom Block to get to the lowest nested Custom Block. Then make your changes to the lowest nested Custom Block, then go back to the next highest Custom Block level and apply your changes - eventually working your way back up to the main notebook level.

nested_custom_block.gif

 

Back to top

Keywords:

 block update open edit custom how-to modify 
Was this article helpful?