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 - nikunj-dhamecha

Pages: [1]
1
General Board / Re: Not able to Add ConnetorTags
« on: February 27, 2023, 03:02:22 pm »
Thanks, it worked! :)

2
General Board / Not able to Add ConnetorTags
« on: February 25, 2023, 12:09:16 am »
Hello Everyone,

I have been trying to add Tag values on the connector as shown below:
Code: [Select]
EA.Connector connector;
connector = target.Connectors.AddNew("","Dependency");
connector.ClientID = source.ElementID;
connector.SupplierID = target.ElementID;
connector.Update();
var tag = connector.TaggedValues.AddNew("Tag", "String");
tag.Value = "tagVal";
connector.Update();

Unfortunately, connector is being created but the tags are not generated on the connector! But if I compare this with EA.Element, then the tags being generated with the same approach!
I am using EA 16! I dont know what extra needs to be set here to add the tag value on the connectors! An input would be helpful! Thanks!

3
General Board / Re: Not able to Create Part Property using C#
« on: February 22, 2023, 08:03:18 pm »
Updating CustomProerties worked!
After checking the CustomProperties on the created Parts, found "isReference".
Thanks for the help !:)

4
General Board / Re: Not able to Create Part Property using C#
« on: February 21, 2023, 09:33:39 pm »
Actually I want the info stored inside t_xref table:

When I create part relation among 3 blocks,
one Composition bewtween two blocks and one Aggregation between two blocks, it adds 2 entries in the table, specially in the description column of t_xref table with the Property Name: _connetorRef and _isReference. I am using these property names for a specific purpose.

For the creation of part, if we create it from UI directly, we have only 2 options for creation.
1.Composition to Part
2.Aggregation to Part

These two leaves some kind of text on the block with the Aggregation relation (Connector)!
If Composition to Part is used, then it shows parts on the block with the part and if Aggregation to Part is used, then it shows references on the block with the part. But this doesn't happen when I try to create part with C#API! After searching in the different tables, I found the _isReference Property present in Description column of t_xref table has one specific value which is either 0 or -1, gives us the idea about that text.

5
General Board / Not able to Create Part Property using C#
« on: February 21, 2023, 04:49:55 pm »
Hello Everyone,

I am trying to create parts on the blocks using C# API, I am using EA 16! Like we create Composition to Part or Aggregation to Part in the Application, I am trying to create the same using C# API. So far, I am able to create Part with the exact traceability if we compare!
The problem I am facing is if I create Part in the application, I am finding some entries in t_xref table which gives some more information about the parts created! And same part if created from C# API, the t_xref table doesn't show anything with respect to Parts created!
Below is the code I am using for creating Part:
Code: [Select]
EA.Connector connector = source.Connectors.AddNew("Aggregation", "Aggregation");
connector.SupplierID = source.ElementID;
connector.ClientID = target.ElementID;
connector.Direction = AddinConstants.Connector.DirectionSrcDest;
connector.SupplierEnd.Aggregation = 2;//if Composition to Part otherwise 1
connector.Update();

Am I missing out some steps here which adds entry to t_xref table? Do I have to set some more properties here?
Thanks in Advance!



6
General Board / Re: How to set Multiple Stereotypes on one EA.Element?
« on: January 23, 2023, 11:13:45 pm »
Thanks Geert for the reply.
It worked for me after inserting "," between two stereotypes! :)

7
General Board / How to set Multiple Stereotypes on one EA.Element?
« on: January 19, 2023, 11:32:51 pm »
Hello Everyone,
I have one query on the way multiple stereotypes are set on an element using C# API.
I am using EA 16 with C# API, trying to create multiple types of elements(Different Metaclasses), I want to set multiple stereotypes,
let's say for a Class, I want to set two different stereotypes i.e. block and constraintBlock

The issue is if only one stereotype is passed, its shown in the application under a respective element, but If more than one stereotype is being assigned to one element, then no stereotypes are shown under the respective element.

What am I doing wrong here? Do I have to set some other properties as well?
Any pointers would be helpful, Thanks!

Pages: [1]