Код был примерно такой:
from comtypes.client import CreateObject
TopApp = CreateObject('TopSolid.Application')
TopApp.Visible = True
TopDoc = TopApp.Documents.Add('top')
TopCircle = TopDoc.Curves.AddBasicCircle(0, 0, 0, 1, 0, 0, 0, 1, 0, 0.01)
#
# Тут выскакивает ошибка по поводу отсутствия свойства Curves в TopDoc
Однако, в документации по api этой системы нашел такие строки:
Many TopSolid objects support more than one interface.
For example, design documents (“*.top” files) are accessible through DocumentDesign objects, which support two interfaces, IDocument for general document handling, and IDocumentDesign for design document specific functionalities.
To do so, TopSolid implements what is known in the COM (Component Object Model) world as “multiple dual interfaces”.
This means that one single object may implement several (what is known as “IDispatch”) interfaces, and one will need to switch from one to another to access the full set of available methods and properties.
Unlike VB, script languages cannot manage objects with multiple interfaces directly.
To compensate for this limitation, TopSolid uses a special mechanism, called “DISPID encoding”, that allows script languages to have access to methods and properties of objects that have multiples interfaces, with the only restriction that the name of the method/property must be unique among all the interfaces implemented in the object.
Usually, this will be the case, but if it is not, then it is the method/property of the first interface that will be called (the ordered list of the interfaces implemented by each object is given in the object description page).
Я не специалист в области COM, но мне кажется что можно работать с этими множественными интерфейсами и на Питоне. Если бы хоть кто из спецов примерчик для аналогичной задачи показал ;)