It looks like they’re just accessing the user32.dll, so you should be able to add a reference to the DLL, import the proper namespaces, and go from there.
Hi,
if installing additional python libraries is an option (I never did that with Dynamo) then there is this thingy called ‘autoit’ and has python bindings:
I have used it with selenium for some web automation, if you want to kick start here is some sample code.
It actually does what you need - focuses on window (standard file dialog), fills the file path and then hits a button. You just have to figure out how to find a window handle (can be by window title fortunatelly) and button / edit field names (if they would be different for some reason).
Althoug you might get away even without looking for a handle, as usually if you hit a button window that pops out is active.
I didn’t think I’d get 1 response so really grateful for your replies
Hmm… so i get the error ‘The module was expected to contain an assembly manifest.’ which a quick google suggests is not easily fixed…
if installing additional python libraries is an option
thank you for those really interesting posts, unfortunately I am trying to avoid it…
an other way to *export* /write warnings to html file with [GetWarnings()](https://www.revitapidocs.com/2018.2/4774613d-600a-e1b5-b5aa-f1ee3b14394c.htm) method
thanks for posting, that is a really interesting bit of Python, unfortunately the GetWarnings wasn’t returning every element for me, so I wanted to use the brute force hacky method… when I run your code a get a message AttributeError: ‘NoneType’ object has no attribute ‘FamilyName’ would you be able to suggest an error catching method for that? thanks
Some elements were not returned with the getwarnings method… hence me looking at the brute force method. I was interested to see that you are able to export info to HTML, but I don’t want you to spend time on this when we won’t reach a satisfactory outcome. If you are really keen, I got a different error this time…
Ok I understand better with the report.
Unless I’m mistaken, this is a temporary report following the automatic creation of elements.
Indeed, all warnings are not signaled in the revision warning messages once the window is closed because Revit apply “some corrections”