Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Hurra

Pages: [1] 2 3 ... 7
1
Solution:

pdata1 = guid, not objectid

...

 :-X

2
Hi!

I have an SQL query where I collect roles which are inherited, denoted with the ^-sign.

Code: [Select]
select roll.ea_guid as CLASSGUID, roll.Object_Type as CLASSTYPE, roll.Name as rName, roll.Note as rNote, rollclassifier.Name as rcName, rollclassifier.Note as rcNote, org.Name as oName, org.Note as oNote, instans.Name as iName, instans.Note as iNote

from (((t_object roll
inner join t_object org on roll.parentid = org.object_id)
inner join t_object instans on org.parentid = instans.object_id)
left join t_object rollclassifier on rollclassifier.Object_ID = roll.pdata1)

where instans.Object_ID = #OBJECTID#
and roll.stereotype = 'ResourceRole'

roll.Note is empty, although when I select it in the project browser, or on a diagram, the Notes section has text. My best guess is that it is an inherited property and therefore not displayed?

Also I try to find the classifier/pdata1 of this role, with no results, i.e. rollclassifier.Name and .Note is empty. Perhaps wrong type of join?

org.Name and .Note as well as instans.Name and .Note are displayed.


Thank you for your time!

3
Automation Interface, Add-Ins and Tools / Re: SQL to find classifier
« on: October 18, 2018, 08:22:11 pm »
Solved it like this:

Code: [Select]
select o.ea_guid as CLASSGUID, o.Object_Type as CLASSTYPE, o.Name as Classifier, o2.Name as Instance
from t_object o
inner join t_object o2 on o.ea_guid = o2.PDATA1
where o2.Object_ID = #OBJECTID#

4
Automation Interface, Add-Ins and Tools / Re: SQL to find classifier
« on: October 18, 2018, 08:10:55 pm »
When I run that positioned on an object it works and lists its classifier.

q.

Well nothing happens for me. I have triple checked that the #OBJECTID# I use is an instance of an object, therefore it definitely should have an classifier? Looks like it on a diagram at least.

Ok, might have figured out the problem. They are properties. If I right click on the object I have "Locate Property Type", not "Locate Classifier".


5
Automation Interface, Add-Ins and Tools / Re: SQL to find classifier
« on: October 18, 2018, 07:44:36 pm »
When I run that positioned on an object it works and lists its classifier.

q.

Well nothing happens for me. I have triple checked that the #OBJECTID# I use is an instance of an object, therefore it definitely should have an classifier? Looks like it on a diagram at least.

6
Automation Interface, Add-Ins and Tools / Re: SQL to find classifier
« on: October 18, 2018, 07:42:39 pm »
Classifier_id matches the object_id, not the GUID.

q.

What do you mean? .Classifier_ID doesn't event exist? Only .Classifier and .Classifier_guid, I tried using .Classifier as Object_ID

7
Automation Interface, Add-Ins and Tools / SQL to find classifier
« on: October 18, 2018, 06:51:13 pm »
Hello!

I don't really get why I don't get any results for this SQL-query...

Code: [Select]
select o.ea_guid as CLASSGUID, o.Object_Type as CLASSTYPE, o.Name
from t_object o, t_object o2
where o2.Object_ID = #OBJECTID#
and o.ea_guid = o2.Classifier_guid

If I change the and statement to
Code: [Select]
and o.Object_ID = o2.ParentID

I get the correct parent, but it doesn't work with classifier?

What am I missing? It's such a small and simple search  :-\

and what does o2.Classifier return? I googled and found:

Quote from: Inside Enterprise Architect by Thomas Kilian
NULL or 0 where not defined. If > 0 then it is the
    primary key of the element which classifies the element

Tried to use it as a returning object ID with no result.

Thanks!

8
Solved it by showing the children through SQL-fragment.

9
That is the only feasible way.

Geert

Hey Geert!

I think we discussed my new problem before;

I send an element for documentation with a document script with assigned template. I want to show the following:

sent to documentation:
<<ActivityPartition>>
(element) Element.name (Element.Classifier) performs (child element) Element.Name (Element.Classifier) (/child element) (/element)

No child elements in documentation. I think you told me this was a bug before.

Using v14.1

10
Hello  ;D

I'm going to try a SQL query, seems easiest.

11
Automation Interface, Add-Ins and Tools / Get what element is classifier of?
« on: September 28, 2018, 12:14:03 am »
Hi!

When handling an element there are a lot of attributes (?) to use in order to get classifier information, e.g. ClassifierID, ClassifierName, ClassifierType.

How do I go the other way?

Element A is a classifier for a, aa and aaa. I don't see any link/relation to the instances.

The reason I want this is because I have used Post elements as classifier of ActivityPartitions. I have all my Posts accesible in my script, all I want to do is collect all the ActivityPartitions and list all owned actions.

Can I do this an easy way?  8)


12
I'm also no SQL guru but string operations are likely to b RDBMS dependent. Google for something like "sql server string concat" which gives you plenty of results.

q.

Thank you!

13
Hello!

I've run in to some problems with a SQL query.

I have defined some roles to an OperationalPerformer (UAF) in a package named x Organisation where x is the alias of the element OperationalPerformer.

I find all the elements I need with

Code: [Select]
select o.ea_guid as CLASSGUID, o.Object_Type as CLASSTYPE, o.Name, p.Name as PName
from t_object o, t_package p
where p.Package_ID = o.Package_ID and p.Name = "x Organisation"

I want to make this more generic for documentation. Therefore my thought was I add the element of interest and use its alias, something like:

Code: [Select]
select o.ea_guid as CLASSGUID, o.Object_Type as CLASSTYPE, o.Name, p.Name as PName, o2.Alias
from t_object o, t_package p, t_object o2
where p.Package_ID = o.Package_ID and o2.Object_ID = 8451 and p.Name = o2.Alias + ' Organisation'
and setting the o2.Object_ID to #OBJECTID#.

However I can't get this to work. I tried all kinds of combinations with parenthesis, brackets, '', "", wildcards (using like).

I guess this has a simple solution, but my SQL skills are not the best.

Thank you!

14
There are two concrete [font=couriereps[/font] of type Electrical Power System. One in the CDHS and one in the DS77S.

q.

Thank you q, makes sense..

What if a subsystem shares an eps? Where would I put the instance in the model hierarchy (project browser). Or is that just bad architecture and should be avoided?

15
Thank you for your time Peter!

When you say duplicate, you don't mean re-use? A mean create a new block called "Wheel Types"? If so, why?

I have Dellegatti's DellSat-77 example and the use of parts confuses me a bit.

The DellSat-77 have a lot of parts, on of which is Electrical Power Subsystem. This block definition, is used in two IBDs hence two "instances" named eps.

Why have two? Wouldn't it be easier with one? And re-use that instance? Isn't this a duplication? Each time Electrical Power Subsystem is used by another block we have to create a new instance? And also define dataOut flows? Or is this flow inherited from the block definition of Electrical Power Subsystem?


Pages: [1] 2 3 ... 7