Draw every Graphic directly from NAV
Draw Shapes, Convert Pictureformats, Design Pictures: You can do everything you would do with an Paintprogram directly from the Commandline with Imagemagick (
http://www.imagemagick.org).
With this Codeunit you can draw all primitives directly in Navision (Lines, Triangles, Quaders, Text, Pie-charts) directly in Navision.
You need the executables (
http://www.imagemagick.org/download/bin ... static.exe) to use this Functions.
You can do much more with Imagemagick. Changing Color and Saturation, Curling Pictures, Mix, resize, Rotate, change Colorsheme and and and.
This Nav-functions show the basics to work with Imagemagick, the screenshot attached to the ZIP is drawn with this functions, the example Code is inside for demonstration purposes. In combination with my Math-Codeunit you can also draw Piecharts and much more with Sin/Cos/Arc calculation. It is only one single Codeunit w/o any Sidefect. The CU is written in 4.03, but should run on Navision 1.3 till 5/2009.
Things to do: You could speed up the Functions by
a) using Script-Batchfiles instead of drawing every single Function
b) Using the Automation server. If you install the DLL-ImageMagick, you get an Automation server which ist working in Navision. This would also reduce the working time. This will not work for the older Navision-versions.
Feel free to optimize, speed up, expand the functions, as long as you let my name in the Documentation part and publish your extensions to the comunity.
The Function generates a *.bmp with lowest possible size which can be directly imported into Navision-BLOB as shown in the Screenshot.
http://www.mibuso.com/dlinfo.asp?FileID=1038
Discuss this download here.
Comments
http://www.imagemagick.org/Usage/text/#unicode
But how ill you decide WHICH Chars you have to Code? Non-japanes Navision can not handle Japanes Chars... Mybe you will generate a translationtable, which holds the translations. Write the needed Chars into a file, and use this file as redirection as mentioned in the Link above. Have Fun with it!
Best regards.
How to do that this program work on navision ?
Please help me to list the step for setup it .
Thanks.
The CU itself is just using the executable. You don't have to install or setup anything, navision needs just to know where it can find the executables (textconstant IM_ConvertEXE).
But under the link you find a complete Imagemagick with OCX and everything else easy to install:
http://www.imagemagick.org/script/binar ... hp#windows
use the Static:
http://www.imagemagick.org/download/bin ... static.exe it will selfinstall at doubleklick.
At least it is not more to do to draw with this Codeunit. But you can do more if you want. You could convert it to an OCX ((DLL) speed up to 1/3 till 1/10 of the runningtime with the executable). You could prgramm more Primitives or Patterngenerators and so on.
1. Download ImageMagick Binaries (link above)
1a. Doubleklick the Exe, the Setup will run.
2. download the Navision-objects
3. Import the Objects in a clean 4.3 Demo-database (you have to use a licence with CU 50018 allowed).
3a. No 4.3 Navision? No Licence for CU 50018, but another free CU? Use the Textfile. You only need to change the ObjectNo in the header. if you import into Navision below 3.x, you just eliminate the Unique ID in the headers of the functions. I Think It will run on every Navision, with modifications you could also use it in the blue version 3.5x (an displaying the result with IrfanView for Example)
4. Let the unit run.
have Success!!
Thank you so much,i will try it .
Best Regards,