Add a Picture from the File System, Without Adding It as a
Resource
You can use a picture from the file system, without adding it
as a resource.
-
From the
Diagram section of the
action bar,
click
Picture
.
The
Drawing dialog box appears and a cross appears
under your pointer.
-
Click the needed position in the diagram and move your pointer to
define the convenient size.
-
Click the diagram when the size is correct.
The
Select Resources dialog box appears.
-
In the
Select Resources dialog box, click
Select a resource in the file system.
The
Select File dialog box appears.
-
In the
Select Resource dialog box,
do the following:
- Optional:
Browse and select the picture to be added to the diagram.
You can select from all image files or select from a specific
image type.
The path to the selected picture appears in the lower
part of the dialog box.
-
Click
Open.
- The selected picture is
added in the diagram.
- The path of the added
picture appears in the
Modelica Graphics Properties dialog box, in
the
Picture Properties section, if that dialog box
is displayed.
Note:
You can control the size of the picture by dragging any handle
around the picture.
Add a Picture Already Available as a Resource
You can use a picture already available as a resource.
-
Follow the steps from Step 1 to Step 3 as described in the first
task above.
-
In the
Select Resources dialog box, click
Select a resource in the Modelica resources of a
library.
The
Select Resource dialog box appears.
-
In the
Select Resource dialog box, do the following:
- Optional:
Browse the
tree
and select the picture to be added to the diagram.
The path to the selected picture appears in the lower
part of the dialog box.
- Optional:
To embed the picture in the Modelica text, select the
Embed picture option.
By default, this option depends on the previous selection.
-
Click
OK.
- The selected picture
is added in the diagram.
- The path of the
added picture appears in the
Modelica Graphics Properties dialog box,
in the
Picture Properties section, if that dialog
box is displayed.
- The picture is
embedded in the Modelica text, if the
Embed picture option was selected.
Note:
You can control the size of the picture by dragging any
handle around the picture.
Add a Picture Not Yet Available as a Resource, and Adding It as a
Resource
You can use a picture that is not yet available as a resource.
By doing that, you also import it as a resource.
-
Follow the steps from Step 1 to Step 3 as described in the first
task above.
-
In the
Select Resources dialog box, click
Select a resource in the Modelica resources of a
library.
The
Select Resource dialog box appears.
-
In the
Select Resource dialog box, do the following:
- Optional:
Browse the
tree
and select the folder where the picture should be imported as a resource.
By default, the library of the activated class is selected.
The path to the selected folder appears in the lower
part of the dialog box.
-
Click
Import Resources.
The
Import Resources dialog box appears.
-
Browse for the picture you want to import and click
Open to validate your selection.
- The picture
appears as a resource in the
tree
in the dialog box.
- The path to the
resource appears in the lower part of the dialog box.
- Optional:
To embed the picture in the Modelica text, select the
Embed picture option.
By default, this option is not selected.
-
Click
OK.
- The selected picture
is added in the diagram.
- The path of the
added picture appears in the
Modelica Graphics Properties dialog box,
in the
Picture Properties section, if that dialog
box is displayed.
- The picture file is
imported as an external resource.
- The picture is
embedded in the Modelica text, if the
Embed picture option was selected.
Note:
You can control the size of the picture by dragging any
handle around the picture.
Add a Picture Using a Resource Table
You can use a picture from a resource table.
For handling of resource tables, see
Creating and Using Resource Tables.
-
Follow the steps from Step 1 to Step 3 as described in the first
task above.
-
In the
Select Resources dialog box, click
Select a resource contained in a Document in the
resource table.
The
Select Resource dialog box appears.
-
In the
Select Resource dialog box, click the line of
the resource you want to use, and then click
OK.
- The selected picture
is added in the diagram.
- The path of the
added picture appears in the
Modelica Graphics Properties dialog box,
in the
Picture Properties section, if that dialog
box is displayed.
Note:
You can control the size of the picture by dragging any
handle around the picture.
Update an Existing Picture
You can update an existing picture, for example, change it to
another picture. You can also use the dialog to change other picture
attributes, including changing if the picture is embedded in Modelica text or
not.
In this scenario you change the picture to another one, already
available as a resource.
Before you begin: You must display the
Modelica Graphics Properties dialog box, if not
already displayed.
- If the dialog box is
minimized in the right part of the screen, click
Modelica Graphics Propperties
to expand it.
- If it is not present at
all, do the following:
- Display the
App Options panel, if not already
displayed.
To access the
App Options
panel, from the
Tools section of the action bar, select
App Options
.
- In the panel, click
Modelica Graphics Propperties
-
Select the picture in the diagram layer or the icon layer.
If the resource corresponding to the picture is renamed, the
picture changes into the picture icon
.
The
Picture Properties section of the
Modelica Graphics Properties dialog box opens.
-
In the
Modelica Graphics Properties dialog box, click
Update Picture.
The
Select Resources dialog box appears.
-
Select what resources to use. You can select an image from the
file system, from Modelica resources, or from a resource table.
In this scenario, select
Modelica Resources.
Note:
Updating an image is very similar to adding an image, so for
use of other resource types, see the corresponding sections above about adding
images.
The
Select Resource dialog box appears.
-
In the
tree
in this dialog box, browse for the resource.
The path to the selected picture appears in the lower
part of the dialog box.
-
Click
OK.
The picture is updated.
|