How to add a map part programmatically?

luisfernandomerlano shared this question 6 months ago
Answered

Hello

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

regards


Luis

Replies (1)

photo
2

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.

---