Author Topic: Accessing FlowItem Property type using scripts or queries  (Read 2186 times)

edehghan

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Accessing FlowItem Property type using scripts or queries
« on: September 24, 2016, 07:42:01 am »
I am trying to access the Type field that is on the Properties -> Property section of a FlowProperty element.

The end usage is to put that piece of information into a document I am making.
How do I access this field and pull the data out using using queries or scripts?
« Last Edit: September 27, 2016, 01:25:33 am by edehghan »

qwerty

  • EA Guru
  • *****
  • Posts: 9822
  • Karma: +190/-154
  • I'm no guru at all
    • View Profile
Re: Accessing FlowItem Property type using scripts or queries
« Reply #1 on: September 24, 2016, 08:11:41 am »
How do you create that FlowProperty?

q.

edehghan

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Accessing FlowItem Property type using scripts or queries
« Reply #2 on: September 27, 2016, 02:18:57 am »
Flow Property is an element in the SysML Block definition toolbox. You use the Flow Property along with an Interface Block to set a port to transfer whatever type of data you want on that port.

I can access the fields in a Flow Property using the dot operator except for that one 'Type' field.

What is the correct .property that points to that particular 'Type' field?

Here is a code snippet of what I am trying to accomplish.

dim theFlowProperty as EA.Element
dim message
message = "Type: " & theFlowProperty.thethingIwant
Session.Output(message)

qwerty

  • EA Guru
  • *****
  • Posts: 9822
  • Karma: +190/-154
  • I'm no guru at all
    • View Profile
Re: Accessing FlowItem Property type using scripts or queries
« Reply #3 on: September 27, 2016, 02:42:22 am »
Ah, I don't have SysML. However, those properties should be accessible via the Element.Properties collection.

I had issues accessing that via my external scripting. If it does not work for you as well, ring back. There's still another way.

q.

edehghan

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Accessing FlowItem Property type using scripts or queries
« Reply #4 on: September 27, 2016, 02:47:17 am »
I randomly managed to answer my own question.
The correct code is:
theElement.PropertyTypeName

The follow on question is what is the t_object query that is the equivalent to .PropertyTypeName?

qwerty

  • EA Guru
  • *****
  • Posts: 9822
  • Karma: +190/-154
  • I'm no guru at all
    • View Profile
Re: Accessing FlowItem Property type using scripts or queries
« Reply #5 on: September 27, 2016, 03:03:55 am »
t_object.PDATA1 (or Element.Miscdata[0]) contains the guid of the element which classifies the port.

q.

marke

  • EA User
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: Accessing FlowItem Property type using scripts or queries
« Reply #6 on: September 05, 2017, 02:10:56 am »
Anyone know why the classifier of the property is not in t_object classifier_guid?

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6489
  • Karma: +57/-6
    • View Profile
Re: Accessing FlowItem Property type using scripts or queries
« Reply #7 on: September 05, 2017, 08:59:18 am »
Anyone know why the classifier of the property is not in t_object classifier_guid?
A classifier is a completely different concept.
Simon

support@sparxsystems.com