GD&T Symbols in the Windows Client
osimren
Member Posts: 29
Hi,
I have a requirement to display GD&T symbols in the windows client of NAV 2013 R2 (as part of a quality control system).
GD&T is this: http://en.wikipedia.org/wiki/Geometric_ ... olerancing
It sounds easy since it is just a text string (like [|,**&|A|B|C]) displayed with a special font.
But as far as I understand it you can’t define a font for a field in the windows client.
Is there an easy way to do this?
My plan right now is to have a field where a user can enter the text string and a BLOB field with a bitmap next to it.
When the text string is entered NAV will draw a bitmap (using System.Drawing.Graphics.DrawString) with the GD&T font and stream it into the BLOB field to be displayed to the user.
But this sounds like a complicated solution to a simple problem, so I just want to be sure I don’t miss a simpler way of doing it.
Thanks!
I have a requirement to display GD&T symbols in the windows client of NAV 2013 R2 (as part of a quality control system).
GD&T is this: http://en.wikipedia.org/wiki/Geometric_ ... olerancing
It sounds easy since it is just a text string (like [|,**&|A|B|C]) displayed with a special font.
But as far as I understand it you can’t define a font for a field in the windows client.
Is there an easy way to do this?
My plan right now is to have a field where a user can enter the text string and a BLOB field with a bitmap next to it.
When the text string is entered NAV will draw a bitmap (using System.Drawing.Graphics.DrawString) with the GD&T font and stream it into the BLOB field to be displayed to the user.
But this sounds like a complicated solution to a simple problem, so I just want to be sure I don’t miss a simpler way of doing it.
Thanks!
Olof Simren - Microsoft Dynamics NAV Expert | Founder of Naviona
My Dynamics NAV Blog: olofsimren.com
My Google Plus Profile
Naviona - My Dynamics NAV Partner
My Dynamics NAV Blog: olofsimren.com
My Google Plus Profile
Naviona - My Dynamics NAV Partner
0
Answers
-
Since the replies have been a bit limited (none
), I went ahead and did my plan b which seems to have worked. \:D/
The result is in the attached image and the code is below (in case anyone run into the same thing).DrawingBitmap := DrawingBitmap.Bitmap(300, 30); // Bitmap size DrawingGraphics := DrawingGraphics.FromImage(DrawingBitmap); DrawingGraphics.TextRenderingHint := DrawingTextRenderingHint.AntiAlias; DrawingFont := DrawingFont.Font('Gd&t#2', 20); // Font and font size DrawingSolidBrush := DrawingSolidBrush.SolidBrush(DrawingColor.Black); DrawingGraphics.DrawString("GDT Text", DrawingFont, DrawingSolidBrush, 0, 0, DrawingStringFormat); "GDT Symbol".CREATEINSTREAM(DrawingInStream); DrawingBitmap.Save(DrawingInStream, DrawingImageFormat.Png);
Here are more details:
http://www.olofsimren.com/display-symbo ... v-2013-r2/Olof Simren - Microsoft Dynamics NAV Expert | Founder of Naviona
My Dynamics NAV Blog: olofsimren.com
My Google Plus Profile
Naviona - My Dynamics NAV Partner0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 333 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions