« Copy and Paste API Applications and Modeless Assertion | Main | Source Code Formatting and Google Prettifier »

May 09, 2013

Comments

Jeremy,

This is off topic to this post, but had a question for you regarding the API and weather something was possible.

Do you have access to all parameters in the project, including calculated values, via the API? If not, which values do you have access to? Assuming you have access to a parameter, are you able to create a link between that parameter and another (via the API)? For example (assuming you have access to the area parameter of a room), could I create an addin that would allow me to pick an existing parameter, and create a direct link to a newly created parameter (of the same type) that would update if the existing parameter updated?

Dear David,

Regarding access to parameters, please use RevitLookup and find out for yourself.

Certainly, you can use the Dynamic Model Update DMU in an add-in to update the value of a parameter based on changes in another one.

Cheers, Jeremy.

Didn't work on W8, however works great on W7. Many thanx Jeremy.

Dear Nik,

Thank you for your confirmation and appreciation.

I am using Win7 myself.

I cannot fix it for Win8 until someone forces me to move there myself, so you will either have to do it yourself or find someone else to support you there.

Please also note this updated version:

http://thebuildingcoder.typepad.com/blog/2013/06/sun-direction-shadow-calculation-and-wizard-update.html#2

Cheers, Jeremy.

I cannot find the Room tab in Ribbon on Revit Structure 2014, please help.

Jeremy,

Thanks for the template . . . I installed the files from the zip in the c# project template folder, edited the csproj file in notepad to change the revit.exe location to Revit 2014 instead of Revit Architecture 2014 (my company has the suite, perhaps this is the difference?) and it works perfectly. Now I can start changing my macros to add ins!

Dear Paul,

Thank you for the appreciation. The pleasure is all mine. It is indeed. Yay, way to go!

Cheers, Jeremy.

Dear Habib,

Try searching in Revit Architecture instead of Revit Structure.

Rooms are specific to architecture.

Cheers, Jeremy.

Jeremy,

I have a unrelated question, Im trying to write a addin in c# in visual studio and I use

form.ShowDialog();
where form is my visual studio designed form, but no items on the form are displayed.
Do I really have to manually add items to a blank form ???

it works if I manually new form();
new every control I want to use on the form manually.

Ive tried googling the subject but I dont seem to find any results.

Regards,
Emil

Dear Emil,

That sounds like a very strange problem, and your description is rather strange as well.

I have implemented and published samples of two kinds of System.Windows.Forms Form instances: statically created in the IDE, and dynamically created by code.

Examples of dynamically created forms are provided by the RoomEditorApp, in the GeoSnoop module:

https://github.com/jeremytammik/RoomEditorApp/blob/master/RoomEditorApp/GeoSnoop.cs

Also by the ScheduleData add-in, in the DisplayScheduleData method in the discussion:

http://thebuildingcoder.typepad.com/blog/2012/05/the-schedule-api-and-access-to-schedule-data.html

Statically defined forms are used e.g. in the BipChecker and PlaceInstances samples:

https://github.com/jeremytammik/BipChecker
BuiltInParamsCheckerForm.cs(6):
public partial class BuiltInParamsCheckerForm
: Form

https://github.com/jeremytammik/PlaceInstances
PlaceInstancesForm.cs(19):
public partial class PlaceInstancesForm
: Form

Cheers, Jeremy.

I do apologize, what happened was the designer generated code really makes a InitializeComponent() function which initializes all the components used in the form. I forgot to call that.
So problem solved, thank you for your help

Regards,
Emil

Dear Emil,

No problem whatsoever.

I'm glad you got it sorted.

This explanation is much less strange than your problem description, thank God :-)

Cheers, Jeremy.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource