Hi,
I'm new in Revit API and i recently realese some simple API.
I'm now trying to do an API which use a forms to ask some parameters value to the user in order to set this parameter value to the selected objects. I created the forms with visual studio.
I'm already not able to open the form...
This is my part of code called by pressing the button in revit ribbon panel :
Public Class CommandHTPOT Implements IExternalCommand Public Function Execute( ByVal commandData As ExternalCommandData, ByRef message As String, ByVal elements As ElementSet) _ As Result Implements IExternalCommand.Execute Dim uiapp As UIApplication = commandData.Application Dim app As Application = uiapp.Application Dim windowsform As New Form1() Dim result = windowsform.ShowDialog() End Function End Class
My research has so far not helped me... When i execute that code I have a transaction error (French language so can't tell you exactly the terms).
Hoping some help !
Thanks a lots
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
Dear Justin,
First of all, as a beginner, I strongly recommend that you take a close look at the Revit API getting started material, especially the DevTV and My First Revit Plugin tutorials.
http://thebuildingcoder.typepad.com/blog/about-the-author.html#2
That will already answer your question.
You can also look at the Revit SDK samples. Several of them display forms as well.
Good luck and have fun!
Best regards,
Jeremy
Dear Justin,
Yes, the automatic transaction mode is deprecated and has been so for a long time:
http://thebuildingcoder.typepad.com/blog/2012/12/extra-transaction-or-regeneration-required.html
"automatic transaction mode is unofficially deprecated, and manual mode is recommended for all cases nowadays. Automatic transaction mode is considered obsolete."
http://thebuildingcoder.typepad.com/blog/2012/05/read-only-and-automatic-transaction-modes.html
Your add-in is probably not properly set up.
The getting started material will show you how to do so.
So will the Revit SDK samples.
There is absolutely nothing special you need to do to run display a Windows form.
Cheers,
Jeremy
Bonjour, pour votre information, nous avons un forum en français: https://forums.autodesk.com/t5/revit-et-bim-francais/bd-p/198
Can't find what you're looking for? Ask the community or share your knowledge.