Book a Demo

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 - PAF

Pages: [1]
1
For newbies: is it possible to give the backdoor code?

I guess, we're talking about some select

Select t_xref.`Type`, client.Object_ID as ClientID, client.Name as ClientName, client.Object_Type as ClientType, supplier.Object_ID as SupplierID, supplier.Name as SupplierName, supplier.Object_Type as SupplierType from t_xref, t_object client, t_object supplier where t_xref.Client = client.ea_guid and t_xref.Supplier = supplier.ea_guid;

I have ParameterGUID, I need to know the multiplicity of it. Don't know how to run selects yet

2
Automation Interface, Add-Ins and Tools / Re: Attribute type namespace=?
« on: January 13, 2022, 05:32:09 am »
dear Geert, thanks a ton, this ClassifierID magic allows to do things faster and cleaner, and is exactly what I was after. Docs are kinda misleading here, I feel

Quote
The ElementID of a Classifier associated with this element; that is, the base type. Only valid for instance type elements (such as Object or Sequence).

I thought I don't need *base* type, and I was working with Class, not an Object or Sequence.
But it worked just fine.

About namespace=true/false, I'm a newbie and didn't give that much thought yet. In my green head they are all the same as of now. But I see relevant property and would read upon that.

Recusion on finding good parent idea is clear. Thanks again.
Alexander

3
Automation Interface, Add-Ins and Tools / Attribute type namespace=?
« on: January 13, 2022, 03:28:09 am »
Friends, thanks in advance for your time!

Please suggest a better way to learn the namespace of Type of Attribute of Class?

So far I could dig it up like this and this does not feel elegant/effective:

Code: [Select]
var p = Repository.GetTreeSelectedPackage()
  var e = p.Elements.GetByName("Usage")
  var a2 = e.Attributes.GetAt(13);
 
    for (var i = 0; i < a2.TypeInfoProperties.Count; i++) {
        var prop = a2.TypeInfoProperties.Items(i);
    Session.Output(prop.Name+": "+prop.Value);
    // name: exampleProductUsage
    // type: {F903116B-4D2B-48e8-884B-9B8392F1C7DB}
    }
    // could not find a way to get property by name instead of scanning all items
    // TypeInfoProperties.GetProperty("name") returns empty string for me (15.2.1555)

Pages: [1]