• Home
  • About Me
  • Contact Me
  • Downloads
  • White Papers
  • Web Sites
  • Post List
  • Articles
  • FAQ

Olof Simren - Microsoft Dynamics 365 Business Central Blog

  • Home
  • About Me
  • Contact Me
  • Downloads
  • White Papers
  • Web Sites
  • Post List
  • Articles
  • FAQ

Display Symbols and Different Fonts in Dynamics NAV 2013 R2

April 29, 2014 Posted by Olof Simren Development, General, Miscellaneous 8 Comments

Some weeks ago I came across a requirement to be able to display GD&T symbols in the windows client of NAV 2013 R2 (as part of a quality control system). It sounded easy since the symbols was generated by a string of regular characters displayed with a special font. In the classic client it would just have been to change the font of the text box and it would probably have worked, but it is not that easy in the 2013 version of Dynamics NAV (and I believe the same applies to the NAV 2009 RTC client).

But as always, most of the things can be solved with some creativity. 🙂 Here is an example of how to display different symbols in the windows client of NAV 2013 R2 by using the System.Drawing.Graphics.DrawString method to draw a bitmap with the special font and stream it back into a BLOB field to display it to the user in the client.

For this example we use a GD&T font to generate a GD&T symbol based on a string of characters entered into a text field in Dynamics NAV.

If you are not familiar with GD&T, here is a description from Wikipedia: Geometric Dimensioning and Tolerancing.

We start with adding two fields in the routing quality measurement table, one text field (GDT Text) for the user to type in the text and one BLOB field (GDT Symbol) for the bitmap to be stored. Make sure to set the SubType property of the BLOB field to Bitmap.

NewGDTFields

Next we add OnValidate code to the ‘GDT Text’ field. The code should draw a bitmap (using System.Drawing.Graphics.DrawString) with the GD&T font and stream it into the ‘GDT Symbol’ field to be displayed to the user. Here is the code.

OnValidateCode

Note; it might be appropriate to have the font, font size and bitmap size above to come from a setup table instead of being ‘hardcoded’. I would probably do this if this gets implemented.

We add the fields to the page and test it but entering some text into the ‘GDT Text’ field and we see the symbol created in the ‘GDT Symbol’ field. Sweet!! 🙂

NewGDTSymbols

Double click on the symbol and it will open in you default picture viewer.

NewGDTSymbolsBitmap

Problem solved! 🙂

Note; it is to be discovered if this works in the web client.

Share this:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X

Related


Discover more from Olof Simren - Microsoft Dynamics 365 Business Central Blog

Subscribe to get the latest posts sent to your email.

Tags: DevelopmentFontsGD&TSymbols
8 Comments
Share
2

About Olof Simren

I am a Microsoft Dynamics NAV and 365 Business Central Expert, I started implementing Microsoft Dynamics NAV in 2002, back then it was called Navision Attain. Throughout the years there has been many exciting implementations in different parts of the world, all of them with different challenges but with one common theme; manufacturing. As a consultant, I bring over 20 years of experience in implementing Microsoft Dynamics NAV and 365 Business Central within manufacturing and distribution companies. The services I offer includes project management, consultation, development and training. Feel free to contact me if you need help with anything related to Microsoft Dynamics NAV or 365 Business Central. I work through my company Naviona where I team up with other skilled Microsoft Dynamics NAV and 365 Business Central Experts.

You also might be interested in

Equisys ZetaDocs with Tectura Document Configurator

Apr 27, 2014

How do I get the Equisys ZetaDocs add-on to work[...]

Kill Sessions in Dynamics NAV

Jan 18, 2015

In the older versions of Microsoft Dynamics NAV where the[...]

Batch Creation of Warehouse Shipments

May 10, 2015

In one of my previous blog posts about processing shipments[...]

8 Comments

Leave your reply.
  • abdy
    · Reply

    January 26, 2016 at 6:21 AM

    Hi Olof,

    thx … i’ve tried but it’s not properly worked…

    if using pre-installed font like “webdings” it’s worked but when i’m using new installed font ex: “Barcode.ttf”, it just get the default font “arial”.

    Is there any different method to use ?

    • Olof Simren
      · Reply

      Author
      January 27, 2016 at 9:05 AM

      Hi Abdy,
      Did you install the font on the same machine as the NAV service is running? And is the font working in other applications on that machine?

      /Olof

      • abdy
        · Reply

        January 27, 2016 at 9:21 PM

        Yes, the font installed on same machine. I tried with the ms.word or ms.excel the font is working properly. All the pre-installed font is worked but only the new any font that i was installed ( got from web ) isn’t working.

        Maybe need use something like system.drawing.text.privatefont collection for outside of pre-installed font ?

        • Olof Simren
          · Reply

          Author
          January 27, 2016 at 9:57 PM

          The GD&T font I used in the example above was also something that was downloaded and installed.
          But give your suggestion a try and let me know if it solves it.

          /Olof

  • jesu
    · Reply

    February 24, 2016 at 5:19 AM

    Hi olof,

    Thanks for your ideas.
    I can able to create images and display in list pages but not able display in card type pages.
    Can you give me the solution.

    Regards,
    jesuraj

  • Antonio
    · Reply

    July 3, 2016 at 2:16 PM

    Works like charm!
    Even using an “external” font…
    Thank you

    • Antonio
      · Reply

      July 3, 2016 at 2:17 PM

      and… in card page mode also…

  • h2c
    · Reply

    February 27, 2017 at 10:10 AM

    May be this is not working any more in 2016+ version of NAV.
    Did you had a chance to test this code again?

Leave a Reply

Your email is safe with us.
Cancel Reply

Subscribe to My Blog via Email

Check Out Our Apps in AppSource

My Dynamics NAV Partner

Naviona, LLC

Categories

  • Assembly (3)
  • Development (35)
  • Finance (14)
  • General (28)
  • Inventory (24)
  • Manufacturing (36)
  • Miscellaneous (27)
  • Purchase (9)
  • Sales (11)
  • Warehouse (7)

Tags

.net Add-in AI AppSource Assembly Assembly BOM Business Central CAL Capacity Consumption Contact Copilot Costs Customer Development Dimensions Excel Finance Flushing General Ledger Inventory Item Item Tracking Low-Level Code MRP NAV 2015 NAV 2016 Output Planning Production Production BOM Production Orders Purchase Orders Receipts Reporting Reports Routing Sales Sales Order Stockkeeping Unit Subcontracting Task List Warehouse Warehouse Shipment Work Center

Recent Posts

  • Business Central Configuration Audit using Vibe Coding
  • Copilot in Planning Parameter Worksheet
  • Copilot in Planning Worksheet
  • Copilot Inventory Queries
  • Record Deletion Tool for Business Central in AppSource
  • Reopen Finished Production Orders
  • XML Buffer and CSV Buffer Tables
  • Functionality Improvements in NAV 2017
  • Reversing Production Output and Consumption
  • Return Merchandise Authorization (RMA)

Categories

  • Assembly
  • Development
  • Finance
  • General
  • Inventory
  • Manufacturing
  • Miscellaneous
  • Purchase
  • Sales
  • Warehouse

Contact Us

We're currently offline. Send us an email and we'll get back to you, asap.

Send Message

Categories

  • Assembly (3)
  • Development (35)
  • Finance (14)
  • General (28)
  • Inventory (24)
  • Manufacturing (36)
  • Miscellaneous (27)
  • Purchase (9)
  • Sales (11)
  • Warehouse (7)

Tags

.net Add-in AI AppSource Assembly Assembly BOM Business Central CAL Capacity Consumption Contact Copilot Costs Customer Development Dimensions Excel Finance Flushing General Ledger Inventory Item Item Tracking Low-Level Code MRP NAV 2015 NAV 2016 Output Planning Production Production BOM Production Orders Purchase Orders Receipts Reporting Reports Routing Sales Sales Order Stockkeeping Unit Subcontracting Task List Warehouse Warehouse Shipment Work Center

Recent Posts

  • Business Central Configuration Audit using Vibe Coding
  • Copilot in Planning Parameter Worksheet
  • Copilot in Planning Worksheet
  • Copilot Inventory Queries
  • Record Deletion Tool for Business Central in AppSource
  • Reopen Finished Production Orders
  • XML Buffer and CSV Buffer Tables
  • Functionality Improvements in NAV 2017
  • Reversing Production Output and Consumption
  • Return Merchandise Authorization (RMA)

Recent Comments

  • Olof on Business Central Configuration Audit using Vibe Coding
  • Andrew Trayfoot on Business Central Configuration Audit using Vibe Coding
  • Barrett Allen on Reopen Finished Production Orders
  • Kateryna on Business Central Configuration Audit using Vibe Coding
  • Takeshi Setoya on Reopen Finished Production Orders
  • Steve on Consignment Inventory
  • Olof Simren on Copilot in Planning Worksheet
  • Omaer Amjad on Copilot in Planning Worksheet

© 2026 · Olof Simren

  • Home
  • About Me
  • Contact Me
  • Downloads
  • White Papers
  • Web Sites
  • Post List
  • Articles
  • FAQ
Prev Next