Revit application macro modules usually saved in:
C:\ProgramData\Autodesk\Revit\Macros\2012\Architecture\VstaMacros\AppHookup\
to install application macros, you just need to copy your application macro module folder under it. You can also duplicate macro modules from this folder and copy onto different machines. The only disadvantage is macro contains source code. if you don't want to share source code with others. try to build add on or plug-ins.
Sunday, December 16, 2012
HOW TO INSTALL / COPY REVIT APPLICATION MACRO
Labels:
add on,
api,
application,
copy,
install,
macro,
plug-in,
revit,
revit 2012,
sdk
revit 2012 Application macro set up tutorials
Revit application macro is easy to develop using vsta. And easy to debug. If you are not aiming to sell your program, and not care about sharing the source code, it is a good and time saving tool. To deploy it is as easy as copying you module file under your revit.
The main tricks for setting up revit application Macro is reference passing. In ThisApplication.cs , the module class, you need to pass 'this',which is the running application itself to your macro class.
In your macro class, you need to define 3 variables,
1. m_app point to running application
2. m_uidoc point to active uidocument , you can use it to get user selection, etc.
3. m_doc point to current active document, the opening revit file you want to modify.
now is the form class, the user interface to take user input if necessary. it is created as an object inside your macro class. just make the controls (elements) public for easy access from macro class. for example:
mainFrame.Textbox1.Text will return you the text input from textbox1(a text field)
also when create this form in macro class, you need to pass macro class itself to it using 'this' key word. the corresponding variable in form class is m_dataBuffer. if you want to access macro class, you can call m_dataBuffer.methodYouWant().
overall, you need 3 files, ThisApplication.cs is created for you by macro manager. ClassMacro.cs for put your business logic(thing to do, to interactive with revit file), Form.cs to interactive with user. put classmacro and form file in a folder for easy management in future.
below are video tutorials:
The main tricks for setting up revit application Macro is reference passing. In ThisApplication.cs , the module class, you need to pass 'this',which is the running application itself to your macro class.
In your macro class, you need to define 3 variables,
1. m_app point to running application
2. m_uidoc point to active uidocument , you can use it to get user selection, etc.
3. m_doc point to current active document, the opening revit file you want to modify.
now is the form class, the user interface to take user input if necessary. it is created as an object inside your macro class. just make the controls (elements) public for easy access from macro class. for example:
mainFrame.Textbox1.Text will return you the text input from textbox1(a text field)
also when create this form in macro class, you need to pass macro class itself to it using 'this' key word. the corresponding variable in form class is m_dataBuffer. if you want to access macro class, you can call m_dataBuffer.methodYouWant().
overall, you need 3 files, ThisApplication.cs is created for you by macro manager. ClassMacro.cs for put your business logic(thing to do, to interactive with revit file), Form.cs to interactive with user. put classmacro and form file in a folder for easy management in future.
below are video tutorials:
Thursday, May 31, 2012
Automatic Rename Revit pdfs with revision information
hi, it is tedious to rename revit pdfs and add revisions as a suffix to company requirement. I just discovered automation tools called, Sikuli, jython(a script language), and itext java package for reading pdfs. It only took me half day to create the program to fetch drawing numbers and revision info then rename the correspongding pdfs. the language is close to simple English and can run on vairious machines with out intallation. do a search and you can find them. and they are all free. Check the video below see how it works.
Labels:
architecture drawing,
automation,
itext,
itextpdf,
jython,
pdf,
revit,
sikuli
Saturday, October 29, 2011
Friday, October 28, 2011
Sunday, September 11, 2011
revit 2011 direct import into Unity3D through FBX Tutorial
now it is possible to use game engine for realistic 3d walkthrough
Saturday, June 11, 2011
Advanced Revit Family Tutorial - stretchable stair numbers
In this tutorial you will learn how to create a stretchable stair number using advanced family techniques, such as locking, label, parameter passing, family in family, formula, parameters, etc.
DOUBLE CLICK ON VIDEO TO MAKE IT BIGGER.
DOUBLE CLICK ON VIDEO TO MAKE IT BIGGER.
Subscribe to:
Posts (Atom)