GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Automating genogram display

Click to view RSS...
Author SDK OLE Automation: GetPictureOfGenoMap and SavePictureOfGenoMap
Posted Tuesday, July 29, 2008 - Post #22273
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Forum Members
GenoPro version: 2.0.1.6

Last Login: Saturday, August 23, 2008
Posts: 9, Visits: 17
It works now. Thanks.
Posted Tuesday, July 29, 2008 - Post #22263
Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master

Gamma
Moderators
Administrators
FamilyTrees.GenoPro.com
Customers
GenoPro version: 3.1.0.0

Last Login: Wednesday, October 7, 2020
Posts: 952, Visits: 10,075
We made a fix. If you download and install http://www.genopro.com/download/InstallGenoPro.2.0.1.6.exeagain, it will work. Previously, the function prototype was

void CopyPictureOfGenoMapToClipboard([in] VARIANT * genomap);


and we changed it to

void CopyPictureOfGenoMapToClipboard([in] VARIANT genomap);


Such code was working fine under a script such as VBScript or JavaScript, however was requiring a reference for a language such as C#. With the new update, you can call the function directly.

m_GenoProdocument.CopyPictureOfGenoMapToClipboard(0);
m_GenoProdocument.CopyPictureOfGenoMapToClipboard("GenoMap1");
m_GenoProdocument.SavePictureOfGenoMap(0, @"c:\picture.emf");


GenoPro has many more functions and methods, and a mechanism to access collections such as all the GenoMaps, individuals, families, pictures, places, however those collections are only accessible from a script running within GenoPro. We need to create a .DLL of GenoPro so those collections are accessible within the address space of your program.

If you want to analyze a picture of a GenoMap, you can use CopyPictureOfGenoMapToClipboard() or SavePictureOfGenoMap() and then read the file from disk and do your analysis. GenoPro only supports the enhanced metafile format, however you can easily convert to PNG, BMP or JPEG.

It turns out that while working on collaboration we found many bug related to injecting XML to GenoPro that we have to say that this simple do not work. Full import/export of data with GenoPro willfinally work withGenoPro Gamma.


Edited: Tuesday, April 20, 2010 by GenoProSupport
Posted Tuesday, July 29, 2008 - Post #22258
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Forum Members
GenoPro version: 2.0.1.6

Last Login: Saturday, August 23, 2008
Posts: 9, Visits: 17
Thanks very much. You will receive the order from NHG very soon.

We are using C# and we are trying to test the new method using your simple project GenoProAutomationCsharp.We saw the new method, but I am not sure how to pass in the ref object genomap as the parameter.

Can you help us to complete the "?????" part?

private void CreateGenoProInstanceIfNeeded()
{
if (m_GenoProDocument == null)
{
m_GenoProDocument = new GenoPro.DocumentClass(); // create instance
m_GenoProdocument.OnDocumentSaving += new GenoPro.IGenoDocumentEvents_OnDocumentSavingEventHandler(m_GenoProDocument_OnDocumentSaving);
m_GenoProdocument.OnDocumentClosing += new GenoPro.IGenoDocumentEvents_OnDocumentClosingEventHandler(m_GenoProDocument_OnDocumentClosing);
}
}
private void button1_Click(object sender, EventArgs e)
{
m_GenoProdocument.CopyPictureOfGenoMapToClipboard(?????);
}



Edited: Tuesday, April 20, 2010 by GenoProSupport
Posted Wednesday, July 23, 2008 - Post #22200
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Thursday, January 16, 2025
Posts: 4,886, Visits: 22,775
If you download and install http://www.genopro.com/download/InstallGenoPro.2.0.1.6.exe, you will get the new method named CopyPictureOfGenoMapToClipboard.

The following code will copy all the GenoMaps to the clipboard.  Of course, it is pointless to copy *all* GenoMaps to the clipboard because the clipboard can only store one graphic item (ie, only one GenoMap):

Set oDoc = ReportGenerator.Document
For Each g In GenoMaps
 If (g.DrawingObjects.Count > 0) Then
  oDoc.CopyPictureOfGenoMapToClipboard g
 End If
Next


Edited: Wednesday, July 23, 2008 by GenoProSupport
Posted Wednesday, July 23, 2008 - Post #22199
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Thursday, January 16, 2025
Posts: 4,886, Visits: 22,775
414485 (7/23/2008)
The deal is confirmed. We need you to build those new methods for us.

With pleasure.  We will send you a link to download your private build so you can test if the new methods are adequate to your needs.

Posted Tuesday, July 22, 2008 - Post #22198
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Forum Members
GenoPro version: 2.0.1.6

Last Login: Saturday, August 23, 2008
Posts: 9, Visits: 17
The deal is confirmed. We need you to build those new methods for us.

Thanks.

Posted Thursday, April 10, 2008 - Post #21357
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Forum Members
GenoPro version: 2.0.1.6

Last Login: Saturday, August 23, 2008
Posts: 9, Visits: 17
Thanks very much for your reply.

We can have the confidence to finilize the things with users now. We will come back to you soon.

Posted Thursday, April 10, 2008 - Post #21347
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Thursday, January 16, 2025
Posts: 4,886, Visits: 22,775
But users also need to include the genogram diagram in standard reports.


One mechanism
By the way, GenoPro 1.x was capable to generate RTF reports with embedded PNG files. The RTF reports have been disabled for GenoPro 2007 because of Unicode issues. Since Version 2.0.1.2, GenoPro includes Microsoft Word and OpenOffice reports. Perhaps I could add new methods to include a genogram inside those reports.

The easy solution for us is that we also get one image copy of diagram when users quit the genopro, so we can save it to the server and can easily use it in our reports.

You can call the method SavePictureOfGenoMap() at the same time you save the XML genogram. You can do this when the user quits GenoPro, or trap the Save event when the user clicks on the Save button. The method SavePictureOfGenoMap() will create a metafile (vector-based image with transparent background) of the genogram. The first parameter is a zero-based index of which GenoMap you want to save. You can import/include the metafile in any word processor, or render it to a Bitmap or PNG. I would avoid the JPEG format for genograms because they will produce bigger files and blured images.


Actually we know you have copy function, we can get the image copy from clipboard, but users do not accept extra steps. We must be able to get it automatically.

I can provide you a method named CopyPictureOfGenoMapToClipboard() where the entire genogram is automatically copied to the clipboard. On your side, you extract the clipboard content and paste it wherever you like.


Edited: Thursday, April 10, 2008 by GenoProSupport
Posted Thursday, April 10, 2008 - Post #21346
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Forum Members
GenoPro version: 2.0.1.6

Last Login: Saturday, August 23, 2008
Posts: 9, Visits: 17
Thanks for your reply.

We are software house to develop EMR system for hospitals. Some of them now asked for genogram module. Now one hospital is confirmed to want the module. We are exploring whether we can use GenoPro to build that module.

Our plan is that launch GenoPro through the OLE Automation, so users can draw genogram in GenoPro and we can get the XML info when users quit GenoPro. We will save those info to server. It is no issue about that. But users also need to include the genogram diagram in standard reports. The easy solution for us is that we also get one image copy of diagram when users quit the genopro, so we can save it to the server and can easily use it in our reports. Now I do not know whether we can get the image copy of diagram easily (it can be BMP or JPEG file. Even can in Clipboard). Actually we know you have copy function, we can get the image copy from clipboard, but users do not accept extra steps. We must be able to get it automatically.

I think we can more or less confirm the deal if you can help us to confirm that we can do that.

I also have confidence to sell more Site licences to other hospital in the future if things are work well.

Thanks.

Posted Thursday, April 10, 2008 - Post #21345
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Thursday, January 16, 2025
Posts: 4,886, Visits: 22,775
414485 (4/10/2008)
That's good. We are not expecting free upgrading forever, it is not right. Normally how long is the period for free upgrading? How much you charge for upgrading? how long is the period for free upgrading again after upgarde? 

Thanks.

Since GenoPro 1.00 was released, everyone got a free upgrade to GenoPro 2007, including those who purchased GenoPro at $10 back in year 2000.  Since its release, GenoPro 2007 had 14 free updates, including the availability of GenoPro in 26 languages.  Every major update includes free updates for at least one year, and perhaps two years.  We plan to release a new upgrade every two years.  You still have one year to use GenoPro 2007.

Our upgrade policy is a 50% to 80% discount of the purchased price, depending on the time you purchased GenoPro before the upgrade become available.  We will have a preview of GenoPro Gamma available in a few months, however this version will be available to our selected customers for testing purpose.

Edited: Thursday, April 10, 2008 by GenoProSupport



Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse
Active: 2 - 1 guest, 0 members, 0 anonymous.
Refresh
No members currently viewing this topic!