PDA

View Full Version : New to Revit API



winnwgomez
2007-08-29, 12:50 PM
Hi

i've been using Revit for a while, but am completely new to Revit API. i decided to look through the samples and the help available, but i have some problems. I hope someone can help me out!

for eg: i edited the revit.ini file to include the code from the sample ' all views' . i added it just as below.


[ExternalCommands]
ECCount=2

ECName1="Earth Connector"
ECDescription1="Avatech Earth Connector for Revit 2008"
ECClassName1="EarthConnector.Command"
ECAssembly1="C:\Program Files\Avatech Solutions\Earth Connector Revit\EarthConnector2008.dll"

[ExternalCommands]
ECCount= 1
ECName1= All Views
ECClassName1= Revit.SDK.Samples.AllViews.CS.Command
ECAssembly1= AllViews.dll
ECDescription1= A new sheet will be generated according to the views selected by the user.

One thing i noticed is there is no dll file in the folder all views. RAC opens up normally and does not show the all view command, but does show the erath connector command.

Can someone help me with what i am doing wrong?

thanks in advance!!

Winn

GuyR
2007-08-30, 12:34 AM
Try this:

[ExternalCommands]
ECCount=2

ECName1="Earth Connector"
ECDescription1="Avatech Earth Connector for Revit 2008"
ECClassName1="EarthConnector.Command"
ECAssembly1="C:\Program Files\Avatech Solutions\Earth Connector Revit\EarthConnector2008.dll"

ECName2= All Views
ECClassName2= Revit.SDK.Samples.AllViews.CS.Command
ECAssembly2= AllViews.dll
ECDescription2= A new sheet will be generated according to the views selected by the user.

Note you still need to compile the AllViews sample and put the correct path to the dll in the ECAssembly2= [Path to dll]\AllViews.dll line above.

HTH,

Guy

winnwgomez
2007-09-05, 11:02 AM
Thanks Guy

by compile, do you mean use VB.Net to compile the allviews sample? forgive my ignorance, but i'm really quite new to this!

thanks again

Winn

mmason.65315
2007-09-13, 03:05 PM
Yes, none of the SDK samples are compiled - you'll have to compile them yourself.

If you open the "SDKSamples10.0.sln" file, it's a Solution which contains project references for all the samples - this will let you compile them all at once.

Best Regards,
Matt