Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: JamesM on July 29, 2020, 11:18:13 pm
-
I'm creating a VBA script to automatically establish a standard set of diagram properties. I am unable to find how I can set the value for ShowForeign, as it is known in t_diagram, or Show Namespace as it is displayed within the tool. Can anyone assist with the syntax necessary to achieve this.
-
t_diagram.showForeign
(from p. 13 of my Inside book)
repository.execute("UPDATE t_diagram SET showForeign = 1 WHERE diagram_id = <theId>")
Not sure about the VBA syntax. Maybe you need to omit the parentheses.
q.
-
repository.execute("UPDATE t_diagram SET showForeign = 1 WHERE diagram_id = <theId>")
Not sure about the VBA syntax. Maybe you need to omit the parentheses.
In theory yes. You are only supposed to use parentheses when you are doing something with the return value.
So
a = function("parameter")is OK
function("parameter")
is not supposed to be OK, but in this case you don't get an error. It's only if you have more than one parameter the you get a syntax error.
function("parameter1", "parameter2")
This should be written as
function "parameter1", "parameter2"
(Yes I agree, that is a weird ass syntax :-X)
Geert
-
It's only if you have more than one parameter the you get a syntax error.
Presumably because it ends up being a parenthesized expression instead of parenthesis around the arguments.