Creating custom stamps, symbols, and action pins - SmartPlant Foundation - IM Update 46 - Help - Hexagon

SmartPlant Foundation Web Client Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10

This functionality was modified in an update. For more information, see Customizing stamps (modified in an update) and Customizing symbols (modified in an update).

You can create your own stamps, symbols, and action pins. The following software is required for this process:

  • A Scalable Vector Graphics (SVG) editor, such as Inkscape

  • A text editor, such as Notepad

Creating a stamp, symbol, or action pin image

The Scalable Vector Graphics (SVG) file format is compatible with the view and markup tool. The SVG file format is a vector file, which can be scaled up or down without losing any of its resolution. To create a custom stamp, symbol, or action pin, you can use an SVG editor. Inkscape is available for free.

  1. To create an image, it is recommended to import an existing SVG file. Most company icons or logos are available in the SVG file format.

  2. Some SVG editors on the market have a toolbar for importing images. Inkscape does not have a toolbar. Instead, click File > Import and select the SVG image you want to include in the stamp, symbol, or action pin.

  3. Choose one of the following import options, depending on your requirements:

    • Embed

    • Include as an editable object

  4. To resize the image, click and drag a corner of the stamp while pressing the Ctrl key.

  5. To center and position the image, press Ctrl+Shift+R.

    • Parts of the image that are not contained on the document might not appear in the final image. Keep the entire image on the page.

    • The size of the image is the size of the stamp, symbol, or action pin that will be available in the view and markup tool. Size accordingly.

  6. Save your SVG file using the stamp file name.

Adding tokens to your stamp

Stamps such as symbols or action pins do not require data. However, the usability of other stamps can be enhanced by it. Tokens are placeholder elements used to add data to a stamp when it is created.

What tokens are available?

The available tokens and their descriptions are listed in the table below.

Token

Description

%Time

The time the print was spooled based on a 12-hour clock (AM/PM). If the tags are viewed on screen, the date on which the screen was last refreshed displays.

Time is based on the browser locale.

%MilTime

The time the print was spooled based on a 24-hour clock.

MilTime is based on the browser locale.

%Title

The name of the file.

%TotalPages or %Pages

The total number of pages.

%Page

The current page number.

%Hostname

The location.hostname of the server url hosting the site.

%SysDatePlusDays(n)

The date generated by a specified number of days past the system date. Replace n with the desired number of days. Negative numbers are acceptable. Make sure you close the parenthesis when adding the number of days.

%BatesPgNo(n)

Indicates the starting page number and the number of digits to use. Replace n with the desired format and starting page number. For example, %BatesPgNo(0002) would place 0002 on the first page, 0003 on the next page, and so on. Make sure you close the parenthesis when adding the page number.

%Date

The date the print was spooled. If the tags are viewed on screen, the time at which the screen was last refreshed displays.

Date is based on the browser locale.

%Login

The login name of the user who is currently logged on.

%User

The user name of the user who is currently logged on.

%Prompt

Adds text strings entered by the user.

  1. Open the SVG stamp file using an SVG editor, such as Inkscape.

  2. Open the text for editing. If you are using Inkscape, press F8.

  3. Enter the token elements you want to add to the stamp:

    For example:

    <TokenTextLine>%Prompt(Please enter your name here:)</TokenTextLine>

    <TokenTextLine>%Date</TokenTextLine>

    <TokenTextLine>%Pages</TokenTextLine>

    • Each token element must be a separate text element, and separate from the rest of the SVG text. To create a new text element, click or click and drag. In Inkspace, you can highlight a text element by clicking it.

    • Token elements should not contain any spaces, other than what is required for the %Prompt token description.

  4. Save changes to your SVG file.

Making the SVG file valid

After creating your stamp, symbol, or action pin, you must make the file valid. You must repeat these steps for each SVG file you create.

  1. Open the SVG file using a text editor, such as Notepad.

  2. Remove all content above the <svg tag, this will probably include an XML declaration.

    The document should start with the <svg tag. If it already does, then you can skip this step.

  3. Save changes to your SVG file.

  4. Move the SVG file to its respective Web Client resource folder:

    • Move stamps SVG files to [drive]:\SmartPlant Foundation Server Files\WebClient_Sites\[sitename]\viewers\resources\stamps.

    • Move symbols SVG files to [drive]:\SmartPlant Foundation Server Files\WebClient_Sites\[sitename]\viewers\resources\symbols.

    • Move action pin SVG files to [drive]:\SmartPlant Foundation Server Files\WebClient_Sites\[sitename]\viewers\resources\actionPins.

  5. Open the stamps.json, symbols.json, or actionPins.json files using a text editor, such as Notepad.

    • The stamps.json file is delivered to [drive]:\SmartPlant Foundation Server Files\WebClient_Sites\[sitename]\viewers\resources\stamps.

    • The symbols.json file is delivered to [drive]:\SmartPlant Foundation Server Files\WebClient_Sites\[sitename]\viewers\resources\symbols.

    • The actionPins.json file is delivered to [drive]:\SmartPlant Foundation Server Files\WebClient_Sites\[sitename]\viewers\resources\actionPins.

  6. Add entries:

    • The stamp SVG file name and the corresponding display name.

    • The symbol SVG file name and the corresponding display name.

    • The action pin SVG file name and the corresponding display name.

  7. Save changes to the stamps.json, symbols.json, or actionPins.json files.

  8. To ensure all changes are implemented, perform an IIS reset or recyle your application pools.