Archi Forum

Archi => General Archi Discussion => Topic started by: Manj75 on July 02, 2021, 12:54:21 PM

Title: Model Tree search on property values
Post by: Manj75 on July 02, 2021, 12:54:21 PM
It appears that search the model tree based on the property and its value is not possible from Archi tool.  I was wondering if this is a feature on the roadmap.

The search filter option will allow to select from a list of all global properties, but it would also be useful to search based on the value of a property. This could be as simple as and 'equals' or expand the feature to regular expression of the value

e.g.

search for all concepts where: property=<select from properties list> equals ABCD
search for all concepts where: property=<select from properties list> starts with AB
search for all concepts where: property=<select from properties list> contains C
search for all concepts where: property =<select from properties list> ends with CD

At minimum the 'equals' operator would be very useful.

I'm aware that this can be done using a jArchi script, but it would be nice to see this feature as a core functionality so that the model tree will be filtered down based on the search results.

If this has not already be requested I will raised a feature request.
Title: Re: Model Tree search on property values
Post by: Phil Beauvoir on July 02, 2021, 13:17:17 PM
> The search filter option will allow to select from a list of all global properties, but it would also be useful to search based on the value of a property.

Simply enter the value of the Property in the search text field.
Title: Re: Model Tree search on property values
Post by: Jean-Baptiste Sarrodie on July 02, 2021, 13:44:50 PM
Hi,

Quote from: Phil Beauvoir on July 02, 2021, 13:17:17 PM
Simply enter the value of the Property in the search text field.

And uncheck the seach ny name and also select the property name in the list first.

JB
Title: Re: Model Tree search on property values
Post by: Manj75 on July 02, 2021, 13:46:26 PM
Cool - looks like I had not fully understood how filters were being applied, but it seems you can select one or many filters and narrow the search within that result set. The search keyword work using a 'contains', so there is no way to say 'starts with' or 'ends with', which is not a big issue.

The search with filters is very powerful once mastered ;-)

I was wondering is it possible to export the filtered/searched resulting model tree to CSV or Excel, or will that just always apply to the whole model?
Title: Re: Model Tree search on property values
Post by: Manj75 on July 02, 2021, 14:06:18 PM
Quote from: Manj75 on July 02, 2021, 13:46:26 PM
I was wondering is it possible to export the filtered/searched resulting model tree to CSV or Excel, or will that just always apply to the whole model?

I just tried this out and it does not support it as the Export to CSV or Export to Excel will always be on the whole model not the filtered subset.

I think this would be a real nice to have feature so that reports can be created in context to the filtered set, although I accept that much of the filtering can be applied on the whole model export in Excel.
Title: Re: Model Tree search on property values
Post by: Phil Beauvoir on July 02, 2021, 14:08:12 PM
The search filter only applies to the Models Tree.
Title: Re: Model Tree search on property values
Post by: Jean-Baptiste Sarrodie on July 02, 2021, 14:15:38 PM
Hi,

Quote from: Manj75 on July 02, 2021, 14:06:18 PM
I think this would be a real nice to have feature so that reports can be created in context to the filtered set, although I accept that much of the filtering can be applied on the whole model export in Excel.

For such need you could also create a jArchi script to export selected data. Then, do your search, select all, run your script ;-)

JB
Title: Re: Model Tree search on property values
Post by: Eric Vendeville on July 02, 2021, 16:39:11 PM
Hi all,

Concerning the model tree search (great feature by the way, very helpful  ! :) ), I was wondering if there was a way to restrict your search exclusively to the current model you are working on (when several models are open at the same time in archi) ? I searched a bit, but didn't find so far...

If not, maybe it could be a nice feature to be able to "logically close" some of the projects open in the workspace (I mean : the project would remain in archi's models tree, but with a "closed folder" icon for example). This way, we would be able to "temporally close" some of the models in order to restrict our search to only 1 model, and be able to easily and quickly re-open them when done (without having to go through "file -> open -> search_the_file_system..." menu).

What do you think of such an idea ? (maybe I am the only one who work with several models opened at the same time, and nobody else is concerned by this use case  ;D )
Title: Re: Model Tree search on property values
Post by: Phil Beauvoir on July 02, 2021, 17:32:17 PM
Hi Eric,

your idea sounds reasonable, but I haven't looked at the Search Filter code for some time so would have to investigate. If this aspect is worked on again we could take a look at it (won't be anytime soon as I have a million other things to do...)

Regards,

Phil
Title: Re: Model Tree search on property values
Post by: Jean-Baptiste Sarrodie on July 02, 2021, 18:21:14 PM
Hi,

Quote from: eric.vdv on July 02, 2021, 16:39:11 PM
If not, maybe it could be a nice feature to be able to "logically close" some of the projects open in the workspace (I mean : the project would remain in archi's models tree, but with a "closed folder" icon for example). This way, we would be able to "temporally close" some of the models in order to restrict our search to only 1 model, and be able to easily and quickly re-open them when done (without having to go through "file -> open -> search_the_file_system..." menu).

Did you tried the "Drill Down" feature, especially the "Go into" ? If no, look at the user guide (https://www.archimatetool.com/downloads/Archi%20User%20Guide.pdf) on p. 12. This makes it possible to have only one model (or even one folder) visible in the model tree. It also limits the search to the visible part.

Regards,

JB
Title: Re: Model Tree search on property values
Post by: Phil Beauvoir on July 02, 2021, 18:28:38 PM
Quote from: Jean-Baptiste Sarrodie on July 02, 2021, 18:21:14 PM

Did you tried the "Drill Down" feature, especially the "Go into" ? If no, look at the user guide (https://www.archimatetool.com/downloads/Archi%20User%20Guide.pdf) on p. 12. This makes it possible to have only one model (or even one folder) visible in the model tree. It also limits the search to the visible part.


D'oh! One day I might actually use this "Archi" tool myself and get to know all of its features...  :D
Title: Re: Model Tree search on property values
Post by: Eric Vendeville on July 02, 2021, 19:43:04 PM
Thanks Phil and Jean-Baptiste for your quick answers !  :)

Concerning the "Drill Down" feature...  d'oh ! (me too  ;D)... I was not aware of this feature until now (never used it, yet I swear I read the user guide...) : it does exactly what I needed, thank you so much : that will change my everyday's life at work ! ;D

Regards,
Eric

edit : really love how the "Drill Down" feature works... even better than my initial idea ! ^^

Title: Re: Model Tree search on property values
Post by: Eric Vendeville on March 08, 2022, 14:16:58 PM
Hello Phil & Jean-Baptiste, and all the archi community...

I would like to go back a bit through this old topic  :)

As I used to work on several models at the same time in Archi, I now like to use (and abuse) the "Drill-Down" feature (as previously advised) when I decide to focus on a particular project : this is particularly useful to "narrow" searches, and avoid to display unwanted elements or relationships coming from other models in search results.

But since I use this (nice) feature, I noticed a behavior that is a little bit annoying to me : I don't know if it is an expected (and deliberate) behavior, or a kind of samll 'bug' (and if I should open an issue on Github) :

When narrowing my searches with the drill-down feature, and after some short amount of time (don't know exactly how much... sometimes more than a minute), the treeview seems to periodically "refresh itself" (as a graphical component in the UI), and the model I previously chose to focus on is lost (all the models are made visible again)...  Then, I have to re-apply my drill-down choice if I want to re-focus on a particular model... again and again...  ;D

Do you think this is something you could possibly investigate ? (or is it a way to definitively "lock" my drill-down choice, that i didn't see ?)

Regards,
Eric.
Title: Re: Model Tree search on property values
Post by: Phil Beauvoir on March 08, 2022, 16:59:14 PM
Hi Eric,

can you provide a set of steps to reproduce when this happens?

There are a couple of cases where the drill-down will reset itself (go "Home") in order to properly refresh the tree:

- if the object being drilled into is deleted
- if a new model is created or opened

Phil
Title: Re: Model Tree search on property values
Post by: Eric Vendeville on March 09, 2022, 09:35:25 AM
Hi Phil, thanks for your answer...

No problem, I can easily reproduce the behavior on my side... Here are some simple steps to reproduce :


This happens whatever you do (not only when an object is deleted, or when you create or open a view).

My environment (if you want to reproduce) is the following :

Thanks a lot Phil for your time and your investigation !  :)
Title: Re: Model Tree search on property values
Post by: Jean-Baptiste Sarrodie on March 09, 2022, 11:07:09 AM
Hi Eric,

Quote from: eric.vdv on March 09, 2022, 09:35:25 AMMy environment (if you want to reproduce) is the following :
[...]
- Plugins: nothing esoteric (only standard official plugins: jArchi, coArchi)

Can you check if you have the "Refresh remote model status in the background" enabled in the "Collaboration" preference pane ? If yes, can you disable it and see if the issue persists ?

Regards,

JB
Title: Re: Model Tree search on property values
Post by: Eric Vendeville on March 09, 2022, 11:10:55 AM
Hi Jean-Baptiste,

Thanks for your answer.
Unfortunately, this option is not activated in my preferences (checkbox is unchecked).

Regards,
Eric.
Title: Re: Model Tree search on property values
Post by: Phil Beauvoir on March 09, 2022, 11:31:37 AM
Eric, I tried your instructions but I can't reproduce it. It's very strange that you are seeing a background refresh in the tree.
Title: Re: Model Tree search on property values
Post by: Phil Beauvoir on March 09, 2022, 11:58:51 AM
Update: it just happened to me.

Eclipse is updating the workbench state in a background thread and this is where the drill-down is reset. I'll see if this can be fixed...
Title: Re: Model Tree search on property values
Post by: Phil Beauvoir on March 09, 2022, 12:34:24 PM
Thanks for reporting this, Eric. This will be fixed in the next version.
Title: Re: Model Tree search on property values
Post by: Eric Vendeville on March 09, 2022, 13:17:09 PM
Great news ! Thank you very much Phil !  :D
Title: Re: Model Tree search on property values
Post by: Phil Beauvoir on March 09, 2022, 14:06:10 PM
Until the fix is released, here's a workaround:

- Close Archi

- Edit (create it if it doesn't exist) this file:

<user_home>\AppData\Roaming\Archi4\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.workbench.prefs

- Add this to the file:

WORKBENCH_SAVE_INTERVAL=0

(0 = never, default is 5, and represents minutes)
Title: Re: Model Tree search on property values
Post by: Eric Vendeville on March 10, 2022, 09:39:06 AM
I just tried your tip / workaround this morning : it works fine and solve the problem ! thanks !