I would like to set some formats of central topic via macro. For example, check the option"organic appearance", adjust the setting"main topic line width"......
However, I can't find the wanted method in Document.CentralTopic. I see there's a method "Document.CentralTopic.SetFromXml(?val)" in object browser. I don't know if possible to check the option by this way.
If possible, how to assign value for "?val" in SetFromXML(). Thanks for your
The XML property is the XML of the topic and all its subtopics. This fact in itself has the potential for big performance issues; if you modify one little thing on the central topic, it could end up re-writing the whole map. You could try reading the XML, making a modification and writing it back. But some of the settings may not appear in the topic XML, as they belong to the default format, which would only be defined in the XML for the whole document and not in each topic. Also, my own experience with writing XML back to topics in the API is that instability sometimes follows. Maybe my XML was not good enough. API methods and properties are much safer than overwriting the XML.
You might be able to do enough of what you need using Topic Styles, as these can be applied and removed through the API.
To ARY: Your suggestion is very good and useful. My screenshot is just an example. There're so many settings in formats of topic, but I can't find the right method for most of them in macro editor. I want to know if possible to to change settings via XML.
To Nick Duffill: Thanks for your professional comments. I have not enough knowledge to do API development and not plan to do that. I only have some skills of VB language. Create simple macros is for the purpose of reducing duplicate manual work. If you can show me a simple example of XML, it will be very good.