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

Pages: [1]
1
Automation Interface, Add-Ins and Tools / Re: Getting clicked model
« on: January 24, 2014, 02:11:19 am »
Thank you, I think I understand the idea. Just one small question. If I click such item:

I get no EA_ContextItemChanged event. If I click any child of it, event is fired properly. Is there any way to get selected item of that type? The reason I am asking is beacause in our projects we have like ~100 items of that type in one EAP file, so I'd like to know which one was selected.
If I select a child of it, I user GetPackageByGUID, which is perfectly fine, but getting selected top level container - is it possible?
Thank you for your help, I appreciate it really much:)

2
Automation Interface, Add-Ins and Tools / Re: Getting clicked model
« on: January 23, 2014, 10:55:10 pm »
Thank you for the answers. I didn't know about Context items, might be I overlooked them in documentation.
Anyway, I might have been not clear enough in what I wrote.
What I want to do, except for what you wrote, which was very good help, is to make my addin expand a whole list with just one click.
I have such structure (took from example):

All items here are expanded - I had to manually click at first Domain Specific Modeling, than GML, than ApplicationSchema and then DataType to expand sublists. So i made 4 clicks. If wanted to expand all elements in this tree, I would have to expand FeatureType, CodeList.. Than in higher level, I'd have to click WSDL item and repeat procedure. For big projects it's a bit annoying - we have a really big model in company, so making 1000 clicks is no fun. What I want do do is to make an addin, which will do what I wrote with just one click, so MyAddin -> Expand whole tree and tadaa, 1000 clicks done with one.
Is it possible to write such addin?
Thank you in advance,
Konrad

3
Automation Interface, Add-Ins and Tools / Re: Getting clicked model
« on: January 23, 2014, 08:07:14 pm »
Thanks, I will try that. And how about visuals - is it possible to make my addin expand a list inside Sparx tool?

4
Automation Interface, Add-Ins and Tools / Getting clicked model
« on: January 22, 2014, 06:58:45 pm »
Hello,
I have a question about interaction with currently clicked model. If I click an item in Project Browser, is it possible to get information which item was clicked? What I want to do is
1) select an item and change specific parameters in whole package (for example I want to change Status of all elements in package from Proposed to Approved).
2) I want my script/C# tool to be able to expand the package list for all subelements inside it. So I click an element, choose my addin, click Expand and I get fully expanded list (all subelements of a list are also expanded).
My question is:
What "tool" I need to use for this task - can I use C# addin or I need to use some sparx script (I googled something about it). If it is a script, could you please provide me a name of it, or some resources, so I can read more about it, learn how to use it.
Thank you guys in advance,
Regards,
Konrad

Pages: [1]