Difference between revisions of "Exercise - Exporting the Traffic Cone Component"
From Flowcode Help
Jump to navigationJump to searchJohnVerrill (talk | contribs) |
JohnVerrill (talk | contribs) |
||
Line 13: | Line 13: | ||
* Select the option 'Export component'. The [[Component Management]] dialogue box opens. | * Select the option 'Export component'. The [[Component Management]] dialogue box opens. | ||
[[File:gen_exerciseLEDexport_componentman01.png|280px|right]] | [[File:gen_exerciseLEDexport_componentman01.png|280px|right]] | ||
− | * Configure this for the traffic cone component as | + | * Configure this for the traffic cone component as follows: |
:* Click on the 'Setup' tab. | :* Click on the 'Setup' tab. | ||
::* Don't assign a category. As a result, the traffic cone will appear in the 'Misc'toolbox. | ::* Don't assign a category. As a result, the traffic cone will appear in the 'Misc'toolbox. | ||
− | ::* Give the component a 'Cosmetic name' of "traffic cone", which | + | ::* Give the component a 'Cosmetic name' of "traffic cone", which then becomes the name given to it in the 'Misc' toolbox. |
::* Click on the check-box next to the 'Use an image of the panel' label. | ::* Click on the check-box next to the 'Use an image of the panel' label. | ||
:* Click on the 'Interface' tab. | :* Click on the 'Interface' tab. | ||
Line 30: | Line 30: | ||
* You may be asked if you want to save the current flowchart. Do so if you wish. | * You may be asked if you want to save the current flowchart. Do so if you wish. | ||
− | * The 'Save As' dialogue box opens. This will automatically point to a destination Flowcode | + | * The 'Save As' dialogue box opens. This will automatically point to a destination used by Flowcode for components. Select a suitable name for the component. |
* Click 'Save'. The component file is saved with a '*.fcpx' extension. | * Click 'Save'. The component file is saved with a '*.fcpx' extension. | ||
Line 38: | Line 38: | ||
==Testing the component== | ==Testing the component== | ||
− | + | Open a new flowchart from the main menu in the usual way. | |
− | Go to the | + | Go to the 'Misc' component category and locate the traffic cone component. |
− | Click on the down arrow next to | + | Click on the down arrow next to it, and select 'Add to system panel'. |
Create a Flowcode flowchart to test the component, such as the one given in the [[Exercise - Testing an imported LED component]] | Create a Flowcode flowchart to test the component, such as the one given in the [[Exercise - Testing an imported LED component]] |
Revision as of 19:45, 27 May 2013
Preliminaries
- Create a traffic cone component as shown in the exercise - Building a Complex Component - the traffic cone.
Declaring the interface
Before you export a component, you need to 'declare the interface'.
- Move the mouse cursor over the System Panel, and right-click.
- Select the option 'Export component'. The Component Management dialogue box opens.
- Configure this for the traffic cone component as follows:
- Click on the 'Setup' tab.
- Don't assign a category. As a result, the traffic cone will appear in the 'Misc'toolbox.
- Give the component a 'Cosmetic name' of "traffic cone", which then becomes the name given to it in the 'Misc' toolbox.
- Click on the check-box next to the 'Use an image of the panel' label.
- Click on the 'Interface' tab.
- Set the 'flash' macro as a simulation macro, by clicking on 'Simulation macro' in the 'Type of macro' drop-down menu.
- In this case, there are no additional files to save with the component, and so you don't need to use the 'Resources' tab.
- Click on 'OK'.
Saving the component
- You may be asked if you want to save the current flowchart. Do so if you wish.
- The 'Save As' dialogue box opens. This will automatically point to a destination used by Flowcode for components. Select a suitable name for the component.
- Click 'Save'. The component file is saved with a '*.fcpx' extension.
Testing the component
Open a new flowchart from the main menu in the usual way.
Go to the 'Misc' component category and locate the traffic cone component.
Click on the down arrow next to it, and select 'Add to system panel'.
Create a Flowcode flowchart to test the component, such as the one given in the Exercise - Testing an imported LED component