|
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
| Author |
Message |
|
SHKaminski
Joined: Tue Aug 07, 2007 1:28 pm Posts: 6 Location: Atlanta, GA
|
 OID to GUID?
How can I programmatically convert a topic OID to a GUID?
MM does this nicely in the GUI with the "Copy as Hyperlink" command on the topic context menu, but as far as I can tell, this function is not available through the API. I do not need to create a GUID--I need to convert the existing OID to a guid. Like this:
OID for a topic = "3DLHM/BCokaqGKl/tYq9Qw=="
GUID for the same topic = {33C732DC-42F0-46A2-AA18-A97FB58ABD43}
There has to be an algorithm for this, but it isn't obvious to me. Does anyone know?
In case you're wondering, I need the URL hyperlink to link to a topic from another app. It works great once I get the hyperlink, but I just can't figure out how to get it through the API.
|
| Sun Mar 16, 2008 3:50 pm |
|
 |
|
SHKaminski
Joined: Tue Aug 07, 2007 1:28 pm Posts: 6 Location: Atlanta, GA
|
 I found the answer
OK--I found my own answer. The OID is a Base64String. You need to convert it to an array of bytes from which you then create a GUID.
In VB.NET, you do it like this:
'Create the GUID from the OID
Dim tGuid As New Guid(Convert.FromBase64String(Topic.Guid))
'Then use this to create an HTML Link just like you get from Ctrl-Alt-C:
Replace("mj-map:///" & MMApp.ActiveDocument.FullName & "#oid={" & tGuid.ToString.ToUpper & "}", " ", "%20")
|
| Mon Mar 17, 2008 2:13 pm |
|
 |
|
SaranyaBE
Joined: Wed Jan 21, 2009 5:37 am Posts: 2
|
 GUID to OId
Hi friends,
I am using Mindmanager 8. I am creating an xml version for the mmap file by using MindmanagerDocument.xml.
MindManager.Application mmApp = new MindManager.Application(); mmApp.Visible = false; MindManager.Document mmDocument = mmApp.AllDocuments.Open(@"E:\Departments.mmap", "", true); string docXml = mmDocument.Xml; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(docXml); xmlDoc.Save(@"E:\DocMap.xml");
Now I want to add a new Topic node to this DocMap.Xml.I am serializing the MindManager.Topic through Xml Serialization. For this I need to specify the attributes OId,Dirty,Gen and all the attributes. I am not sure on How to generate OID from Guid,Dirty,Gen?
Please help.
R.Saranya.
|
| Wed Jan 21, 2009 5:50 am |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum
|
|