I am working on a script that will create a visio diagram. I can create the the document and add items to the document. The problem i am having is that i want to add custom properties to each of the items i place on the document. I basically created a macro of what i wanted to do and now i am trying to convert it from VB over to kixtart.
Here is the Code:
Code:
Dim UndoScopeID1 As Long
UndoScopeID1 = Application.BeginUndoScope("Define Custom Properties")
Dim vsoShape1 As Visio.Shape
Dim intPropRow2 As Integer
Set vsoShape1 = Application.ActiveWindow.Page.Shapes.ItemFromID(2)
intPropRow2 = vsoShape1.AddRow(visSectionProp, visRowLast, visTagDefault)
vsoShape1.CellsSRC(visSectionProp, intPropRow2, visCustPropsLabel).FormulaU = """Property1"""
vsoShape1.CellsSRC(visSectionProp, intPropRow2, visCustPropsType).FormulaU = "0"
vsoShape1.CellsSRC(visSectionProp, intPropRow2, visCustPropsFormat).FormulaU = """@"""
vsoShape1.CellsSRC(visSectionProp, intPropRow2, visCustPropsLangID).FormulaU = "1033"
vsoShape1.CellsSRC(visSectionProp, intPropRow2, visCustPropsCalendar).FormulaU = ""
vsoShape1.CellsSRC(visSectionProp, intPropRow2, visCustPropsPrompt).FormulaU = ""
vsoShape1.CellsSRC(visSectionProp, intPropRow2, visCustPropsValue).FormulaU = """Value1"""
vsoShape1.CellsSRC(visSectionProp, intPropRow2, visCustPropsSortKey).FormulaU = ""
Application.EndUndoScope UndoScopeID1, True