You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
I have the script below that works well for defining a relationship for a single element however I need to loop through a SQL query for all elements that the source element links to however am unsure how to do so. Can someone please help?
Code:
var selectedPackage as EA.Package; selectedPackage = Repository.GetTreeSelectedPackage();
if ( selectedPackage != null ) { // Create client and supplier classes under the selected package var client as EA.Element; var supplier as EA.Element; var clientID, supplierID;
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
You don't need SQL in that case. Just iterate through SourceElem.Connectors and find Repository.GetElementByID(Connector.SupplierID) (or .ClientID depending how your connectors are oriented).
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
707664737578010 wrote:
I'm no JScripter but Code:
con = Elem.Connectors.GetAt(0); e1 = Repository.GetElementByID(con.ClientID);
should work.
q.
Thanks qwerty. I'm not wanting to iterate through the connectors. I want to iterate through an array e.g. var testdestination = [9676,1234,9899]; which would then feed into Repository.GetElementByID(testdestination[i]) [original message]
qwerty
unread,
Feb 14, 2014, 5:14:00 AM2/14/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
6F697B6C6A671E0 wrote:
Hm. Then what is the issue?
q.
The issue is supplier = Repository.GetElementByID(testdestinationelement[i]);. I get an "Internal application" error despite the value being an integer.
[original message]
qwerty
unread,
Feb 16, 2014, 2:36:00 PM2/16/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Hmm. That could have a couple of reasons. Have you tried with supplying a simple integer. And then by first passing the array contents to an integer before passing that to the Get method?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
6F697B6C6A671E0 wrote:
Hmm. That could have a couple of reasons. Have you tried with supplying a simple integer. And then by first passing the array contents to an integer before passing that to the Get method?
q.
Yes. I was able to resolve the issue although it makes no sense. I needed to include quotation marks around the integer in the array e.g. "2".
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
The values are some Win32 objects (variants). No idea how to create a dedicated integer in your language, but coercing from a nice string seems to work then.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
585E4C5B5D50290 wrote:
The values are some Win32 objects (variants). No idea how to create a dedicated integer in your language, but coercing from a nice string seems to work then.
q.
What do you mean by "The values are some Win32 objects (variants)"?
[original message]
qwerty
unread,
Feb 16, 2014, 6:05:00 PM2/16/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Maybe I was mislead by he way it's treated in Perl where the arguments are passed via Win32 OLE objects (variants). In Perl it does not matter whether you use a string or a number. Both will be converted the right way. But IIRC the parameters are generally passed as objects, not as primitives. To be honest, I'm not very sure how parameters are passed to the API of EA.