PropertyChanged event unsubscribing works only for public static methods
publicstatic void TabPropertyChangedEvent(object sender, PropertyChangedEventArgs e)
{
Re: Element Selection Changed Event - Implementation Struggles
Re: Revit Print pdf error
Try to print after making view as the Active View
REST requests through pyRevit
Hi all,
I'm trying to create a pyRevit button which uses some information I'm getting from a website api using REST requests.
All is working fine when I'm just requesting and running the code on Visual Studio Code, but once I try to turn the whole thing into a button it seams like it doesn't recognize the 'requests' module.
I've been searching and searching but didn't find any information about how to import a module pyRevit doesn't recognize automatically or about a different inherent module suitable for my needs.
Would really appreciate any advise about the matter.
I have attached a print screen of the code.
Best,
Ifat.
Re: REST requests through pyRevit
Is the requests module something that you built yourself?
If not, have you researched as to whether the requests module you're using is compatible with ironpython?
There's not much more I can say without digging through your code. Having worked with pyRevit and revitpythonshell in the past, a very common issue is compatibility with the ironpython implementation.
Re: Group Edit Event
You can do this by handling the DocumentChanged event and checking if the transaction name is "Edit Group"
public Result OnStartup(UIControlledApplication application) { application.ControlledApplication.DocumentChanged += ControlledApplication_DocumentChanged; return Result.Succeeded; } private void ControlledApplication_DocumentChanged(object sender, Autodesk.Revit.DB.Events.DocumentChangedEventArgs e) { if (e.GetTransactionNames().FirstOrDefault() == "Edit Group") { // user enters Edit Group } }
---
Ahmed Nabil
https://www.linkedin.com/in/anabil1/
https://www.upwork.com/o/profiles/users/_~01676f5c2a8157f5d3
Re: Group Edit Event
Thank you for the suggestion.
The document changed event is fired after the transaction has been terminated.
So, would this event not be triggered after the user exits the group edit mode?
Re: Group Edit Event
Hi Jeremy, it's my pleasure.
This event is fired both on entering the Edit Mode (under the transaction name "Edit Group") and on exiting (under the transaction name "Finish Edit Group")
---
Ahmed Nabil
https://www.linkedin.com/in/anabil1/
https://www.upwork.com/o/profiles/users/_~01676f5c2a8157f5d3
Re: Group Edit Event
Every businessman knows that employees are main people in any company or organization. Because of what the process of hiring them is also very important. But when you are an owner of a business it’s quite hard to evaluate the work of HR. So when I decided to check my HR-department I found a company that provides with the service of mystery employee (by the way they are true professionals so I recommend them - https://scheduling-europe.com/service/mystery-shopping/mystery-employee/). After my decision I determined that my HR is a really good worker and now I am absolutely confident in him.
Support for .net framework or .net core for building Revit plugin / ribbion.
Hi,
I am building a Revit plugin / ribbon and would like to know which version of .net framework or .net core can I use with different Revit versions. I am using Revit 2017, 2018, 2019.
Can I use .net core or only .net framework can be used.
Could someone please provide complete list of compatibility between various Revit versions and .net framework or core versions.
Thanks,
Amit Sethi
Re: Support for .net framework or .net core for building Revit plugin / ribbion.
2016: net45
2017: net452
2018: net46
2019: net47
2020: net47
Re: how to close all dockablepane
UiApplication.GetDockablePane(DockablePaneId id);
Store you DockablePaneId somewhere after you create them (static properties are recommended).
DockablePane.Hide();
DockablePane.Show();
Re: Easiest solution to Deploy Addin in Offcie
You can also use installers with Group Policy as well. In my experience this works the best in a company network.
Re: Support for .net framework or .net core for building Revit plugin / ribbion.
If you want core compatibility, you can also target .NET Standard
Issues synchronizing over local network
Hello,
I work for a small design firm. We use Revit versions 2016-2020. I have been having issues syncing my local files with our central models for about a month now, across versions 2017, 2018 and 2019. We store central models on a network drive (Q:) and local files to the standard My Documents location.
When I attempt to synchronize with the central, I get the error message: "An unknown error occurred while accessing \incrementtable.dat" The file name varies but it is always a .dat.
We have cleared all local files from my documents and emptied the recycle bin. I have tried resetting the network and remapping the drives. The fix is always only temporary.
I am happy to provide any more info you need. Thank you,
Rae
Re: Issues synchronizing over local network
Unfortunately, this is not the best place to ask such a question.
Please note that this discussion forum is dedicated to programming Revit using the Revit API.
Therefore, you cannot expect an answer to a question such as yours relating to installation, product usage or end user support issues here.
You should try one of the non-API Revit product support discussion forums instead for that:
The people there are much better equipped to answer your question than us programming nerds.
I hope this clarifies.
Thank you for your cooperation and understanding.
Best regards,
Jeremy
Re: Support for .net framework or .net core for building Revit plugin / ribbion.
Thanks for providing the solution. Is dot net core supported for writing Revit plugins. Versions of Revit still remain the same as asked in the question.
Thanks,
Amit
Re: Support for .net framework or .net core for building Revit plugin / ribbion.
Hi,
Thanks for providing the solution. Could you please provide more details about it. Which version of Revit support dot net standard libraries. More details are mentioned in the question.
How to get default button name
Hi,
Is there a way to get the default buttons and its names. For example, I would like to get Manage > Visual Programming > Dynamo, and show a message when that button is clicked.
Thank you.
Re: How to create a calculated field with a formula in Revit 2017.
Dear Jeremy,
Do you know if there are any changes in the API on this subject?
Re: How to read output value from Dynamo using Revit API?
Hi,
There is no direct way to get the output from Dynamo through Revit API.
The idea of running Dynamo script from Revit has been implemented as Dynamo Player.
If you really don't want to use Dynamo Player, you can develop your own "Dynamo Player" by compiling .dyn files through the source code of Dynamo. But I'm pretty sure you'll have a lot of work to do if you choose this way.
Below is the the git of the Dynamo, maybe you'd like to take a look at it:
https://github.com/DynamoDS/Dynamo