PTV Visum - Frequently Asked Questions (FAQs)

(#VIS17740)

How can I open an external matrix over COM?

An example using the IMatrix.Open-method (Python):

matpath=os.path.join(path,'C.mtx')
Mat = Visum.Net.Matrices.ItemByKey('1')
Mat.Open(matpath)


Alternatively use this way over the demand segment, when the matrix number or code cannot be used (VBA):
visum.Net.DemandSegments.ItemByKey('K').ODMatrix.Open(matrixPath)
(C#):
visum.Net.DemandSegments.get_ItemByKey('K').get_ODMatrix().Open(matrixPath);


To open a new external matrix (VBA):

Dim myNewMatrixEditorObject As IMatrixTable
Set myNewMatrixEditorObject = Visum.CreateMatrixTable(matrixPath)