jeremytammik / RevitLookup

Interactive Revit RFA and RVT project database exploration tool to view and navigate BIM element parameters, properties and relationships.
http://thebuildingcoder.typepad.com
MIT License
1.03k stars 294 forks source link

Special modal mode for Revit lookup #171

Open CADBIMDeveloper opened 1 year ago

CADBIMDeveloper commented 1 year ago

Hi @jeremytammik @Nice3point2

I'm just thinking about bringing modal mode support back.

Motivation: I'm actively using Iron Python shell for testing and prototyping and earlier I could use RevitLookup together with IPS like:

#do something
lookup(some_object) #execution stops here
#do something else with some_object
lookup(some_object)

Of course I still can print to console or write to file, but it's much less comfortable, requires more time (remember, I'm mainly using it for prototyping)

There is no need to make changes in the UI, just have some utilities in DLL that can be used externally.

I can do it by myselft when I have time if someone else needs this :-)

What do you think?

Nice3point commented 1 year ago

just have some utilities in DLL that can be used externally

Hi Alexander @CADBIMDeveloper, I still don't understand what functions we are talking about, can you clarify?

jeremytammik commented 1 year ago

Hi Alexander, your use case makes total sense. So you mean a modal Python lookup form that opops uop and remains, and your Python code sits ands waits until it is closed again. Is the lookup method non-modal now? Does RevitLookup not have any modal forms at all anymore? Everything modeless now? Sure, go ahead, minimal, keep it simple.

CADBIMDeveloper commented 1 year ago

@Nice3point , I mean to have some public classes with methods that could be called by external code accepting object(s) to snoop which will run RevitLookup in modal mode.

@jeremytammik , I haven't dive into the code deeply yet, but it looks that everything is modalless now

CADBIMDeveloper commented 1 year ago

So you mean a modal Python lookup form that opops uop and remains, and your Python code sits ands waits until it is closed again.

@jeremytammik , that's exactly what I want to have :-)

chuongmep commented 1 year ago

@Nice3point @jeremytammik I think this is exactly what @CADBIMDeveloper want https://github.com/architecture-building-systems/revitpythonshell/pull/124

CADBIMDeveloper commented 1 year ago

No, I don't want this. The PR you mentioned is a) outdated b) fixed only the API changes for RevitLookup access for the date of that PR

Nice3point commented 1 year ago

Let me know if you need to add anything else

CADBIMDeveloper commented 1 year ago

Now it's useless, or I don't see something.

The idea was the following:

Some external code asks RevitLookup to snoop something, let's say some element. Then RevitLookup pops up it's window in dialog modal mode giving the opportunity to explore it. When the user closes the dialog, external code continue it's execution, potentially calling RevitLookup again