A
Alvaro
This code works to drive a visio drawing embeded in a mathacad worksheet,
but fails in visio 2003. I'm also need that the code works with visio XP
(2002).
A code to drive a visio drawing in excel is helpfull, because I think that
works with mathcad (mathcad can only handle vb script).
"In0" ... "In2", "Out0" are the names of circle shapes. Inputs and Outputs
are the variable names that mathcad get to the component.
Thanks in advance.
Code:
-----------------------------------------
Sub VisioObjEvent_Start()
Rem TODO: Add your code here
End Sub
Sub VisioObjEvent_Exec(Inputs,Outputs)
'define objects to manipulate
Set In0obj = Shapes.Item("In0")
Set In1obj = Shapes.Item("In1")
Set In2obj = Shapes.Item("In2")
Set Out0obj = Shapes.Item("Out0")
'get the input from Mathcad
In0 = Inputs(0).Value(0)
In1 = Inputs(0).Value(1)
In2 = Inputs(0).Value(2)
'update the input terminal text
In0obj.Text = CStr(In0)
In1obj.Text = CStr(In1)
In2obj.Text = CStr(In2)
'implement the logic in the drawing to change the text of
' the output terminal
Out0 = (In0 Xor In1) Xor In2
Out0obj.Text = CStr(Out0)
End Sub
Sub VisioObjEvent_Stop()
Rem TODO: Add your code here
End Sub
but fails in visio 2003. I'm also need that the code works with visio XP
(2002).
A code to drive a visio drawing in excel is helpfull, because I think that
works with mathcad (mathcad can only handle vb script).
"In0" ... "In2", "Out0" are the names of circle shapes. Inputs and Outputs
are the variable names that mathcad get to the component.
Thanks in advance.
Code:
-----------------------------------------
Sub VisioObjEvent_Start()
Rem TODO: Add your code here
End Sub
Sub VisioObjEvent_Exec(Inputs,Outputs)
'define objects to manipulate
Set In0obj = Shapes.Item("In0")
Set In1obj = Shapes.Item("In1")
Set In2obj = Shapes.Item("In2")
Set Out0obj = Shapes.Item("Out0")
'get the input from Mathcad
In0 = Inputs(0).Value(0)
In1 = Inputs(0).Value(1)
In2 = Inputs(0).Value(2)
'update the input terminal text
In0obj.Text = CStr(In0)
In1obj.Text = CStr(In1)
In2obj.Text = CStr(In2)
'implement the logic in the drawing to change the text of
' the output terminal
Out0 = (In0 Xor In1) Xor In2
Out0obj.Text = CStr(Out0)
End Sub
Sub VisioObjEvent_Stop()
Rem TODO: Add your code here
End Sub