Friday, November 27, 2009

XrmVisioER: CRM/xRM ER Diagram Generator Revised Version

Last week, my colleague said XrmVisioER diagram generator takes too long to retrieve entity information at log-in process. When he tried the program for first time, he even though it was not working :) I also noticed that its took around 3 mins+ to retrieve meta data information from remote server. This morning, I decided to review my program again and did necessary changes.

Here is the list of updated features:
  • Reduce processing time at application log-in process
  • Apply caching concepts on meta data retrieval process
  • Diagram pages will be shown as display name of an entity
  • Provide user friendly information on screen while generating diagrams






Configuration:
Connection: Cable 8 mbps
Server: Remote Hosted Server, Win 2003, 4GB RAM, VMWARE
Client: WinXP, 2GB RAM,  Core 2 Duo 1.8 GHz

Testing Scenario:
Drawing 1 entity: takes 1 min+
Drawing 3 entities: takes 1 min 28 sec
Drawing 280 entities: takes 15 mins+ (avg of 3.4 sec/entity)

Download Link:
XrmVisioER - CRM/xRM ER Diagram Generator (Application)
XrmVisioER - CRM/xRM ER Diagram Generator (Source Code)

Reference:
XrmVisioER - Metadata Diagram Generator
Power User Tips: The CRM 4.0 Metadata Cache

----------------------------------------------------
Updated on 16th Dec 2009:
  • Add re-size feature to entity diagram
  • Remove relationship attribute name from entity diagram
  • Add an option to draw all entities in one page

20 comments:

Anonymous said...

I like the idea of your tool, but it throws an exception on my machine (windows 2008 server R2 64bit).

Any idea...thanks in advance for your help!

Regards!

Thuta said...

I see. I used only 32 bit crm dlls in my program. I will test it out on 64bit machine and let you know.

If you need it urgently, you can connect your CRM server through your Win XP (32bit) client machine and generate the diagrams. But Visio must installed on that XP computer. Feel free to contact me if you need help. Thanks for your info.

Anonymous said...

Today, i used a 32bit VM (windows server 2008, visio 2007).
The tool loads the entitylist - but when i hit "generate" it only creates the first entity (1 of x) and crashes.
When i select "end program", visio asks wether i want to save Diagram1. This Diagram only contains one entity.
What am I doing wrong?

Thanks & Regards
Jan

Thuta said...

Hi Jan

Today, I test my application on Windows Server 2008 (64bit), and found that application is not working because of 32bit dlls.

I tried to connect Windows Server 2008 (64bit) and generate diagrams from my Windows XP (32bit) laptop, it works fine. I can generate diagrams. But, I haven't test my application on Windows Server 2008 environment yet.

According to comment, if you can see all entities in grid, it can not be access right issue. Can you do me a favor? Please test whether Visio is running properly on your server. If you don't mind, can you give me the specification of your testing environment such as Version and platform of OS , .NET and Visio?

Anyway, I will try to test my application on both Windows server 2008 32bit and 64bit platform. I will update my test results by tomorrow night (SG Time). Sorry for inconvenience.

Best Regards
Thuta

Anonymous said...

Hey Thuta,

i did some additional tests on different machines. The result is always the same: it crashes after drawing the first entity. Here's my setup:

-Windows Server 2008 SP1, Visio 2007, connecting to a 64bit CRM Server (Windows Server 2008 R2)

-Windows Server 2008 SP1, Visio 2007, connecting to a local CRM Deployment

-Windows XP 32bit, Visio 2003, connecting to a 64bit CRM Server (Windows Server 2008 R2)

Thanks for your help, i really appreciate it!

Regards
Jan

Thuta said...

Hi Jan,

Thanks for your info. I am setting up my test environment on Windows Server 2008 (64bit) SP1, Visio 2007 and VS.NET 2008.

I will reply to you asap after I got my test results. If everything OK, I will upload 64bit compiled version for you.

Thanks for your patient and interest in my application.

Best Regards
Thuta

Thuta said...

Hi Jan,

I tested my application on Windows Server 2008 (64bit) SP1 and using Visio 2007 Trial Version. I can generate diagrams successfully.

I admit that my application crashed after generating all ER diagrams on Win 2008 server. Below is the link of my compiled application. If you don't mind please help me test it on your Windows Server 2008 (64bit) platform.

XrmVisioER (64bit)

BTW, I am using crmadmin account to generate diagrams. Hope to hear from you soon.

Thanks
Thuta

Anonymous said...

Hi Thuta,

i tested your 64bit version. I selected one entity and hit "generate", which resulted in the following exception (stacktrace):

" at Microsoft.Office.Interop.Visio.CellClass.set_Formula(String lpbstrRet)\r\n at XrmVisioER.VisioDiagram.DrawEntityRectangle(Page page, String entityName, OwnershipTypes ownership) in C:\\XrmVisioER\\VisioDiagram.cs:line 438\r\n at XrmVisioER.VisioDiagram.BuildDiagram(String[] entities) in C:\\XrmVisioER\\VisioDiagram.cs:line 237\r\n at XrmVisioER.VisioDiagram.Draw(String[] entityList) in C:\\XrmVisioER\\VisioDiagram.cs:line 192\r\n at XrmVisioER.XrmVisioER.DrawDiagram() in C:\\XrmVisioER\\XrmVisioER.cs:line 147\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.ThreadHelper.ThreadStart()"

I don't know if this helps you finding the error :)

Thanks for your help & regards,
Jan

Anonymous said...

Hey,

it's working! I dowloaded and debugged the 32bit solution of your tool. The following line caused problems:

rect.get_CellsSRC(VISIO_SECTION_OJBECT_INDEX, (short)VisioApi.VisRowIndices.visRowFill, (short)VisioApi.VisCellIndices.visFillForegnd).Formula = fillColor;

After commenting out this line, the tool works fine (well, besides the fill colors :) )

Regards
Jan

Anonymous said...

By the way: in visio, the tool generates one sheet per entity. Is it possible to generate one ER diagram of the whole data model?

Thanks
Jan

Thuta said...

Hi Jan,

Glad to hear that it is working ;) I can't figure it out how to help you.

Current version can only generate one sheet per entity. I purposely do it for readability. But I can change a program a bit to draw in one diagram. I will update my changes tonight. Thanks.

Best Regards
Thuta

Thuta said...

Hi Jan,

I update the program and source code already. I also add auto resize feature for all shapes in diagrams. Hope it can help you in your work. Thanks.

Best Regards
Thuta

Anonymous said...

It works fine - thanks for your help!

Regards
Jan

Dave Berry said...

Thuta,

I added your project to the Ultimate CRM Tools list I copied to my site: http://crmentropy.blogspot.com/p/ultimate-dynamics-crm-tools-list.html

The original list hasn't yet been updated at the source site, but I thought you should know of the reference.

Thuta Hlaing said...

Thanks Dave :)

Anonymous said...

Hi Thuta,

It is a very intersting tool.
I was searchinf for ER diagrams lately on MSDN and came across this tool.
I have downloaded this on my machine but unfortunatel it crashes as I fill in all the credentials for my CRM system.

Please can u guide me through the pre requisites of the tool..

I do not currently have Visio instyalled on my ev machine but I am now downloading Visio 2010
trial version.

Will this work with Office 2010 as well.

Please do let me know.

Thanks In Advance.

Thuta Hlaing said...

Hi,

I haven't test it with Visio 20101 before. I only tested it on Visio 2007. May I know exactly which step the application crash? Do you manage to view the entity list in application? Thanks!

Andriy a33ik Butenko said...

Hello, Thuta.

Thank you for your wonderful solution. One problem I faced with - it didn't work for IFD. So I added this authentication type to functionality. If you want I can send you modified project.

Thank you one more time. You are the best.

Thuta Hlaing said...

Hi Andriy,

Thanks for your info. Could you plz share the code with me so that I can update the current version. Sorry for my late reply :)

Again, Thanks!
Thuta

Unknown said...

its not working on my PC
mine is 64bit, windows 7

Post a Comment