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 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 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 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 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 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 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 #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.


Similar Topics

Click to view RSS...
Expand / Collapse
No results found!

Reading This Topic

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