How to add a map part programmatically?

luisfernandomerlano shared this question 2 years ago


I need to add a map part in a topic programmatically; can someone give me a hand about how can i call the map part, and how to add in a topic via winwrapbasic?

thanks in advance for your support



Replies (1)


Hello Luis

To do this, you have to first find the map part file (.mmmp) on disk. These are usually in the Map Parts folder in the library. The address of Map Parts folder in the default library can be found with Path(mmDirectoryMapParts). You may have Map Parts in other libraries or elsewhere on disk.

Then when you have the file and have checked that it exists, use Topic.Subtopics.Add("path\file.mmmp") where "path" and "file.mmmp" are the path and file name of the map part.