API Examples - Setting Office Address

API Examples - Setting Office Address

Anonymous
Not applicable
543 Views
2 Replies
Message 1 of 3

API Examples - Setting Office Address

Anonymous
Not applicable

Hi All,

 

First post on the API forumn.

 

Have been muddling my way through Revit API for a couple of months now, having no previous programming expereience need a few pointers and examples if anyone is able to help me.

 

Trying to create a line of code to use with my companies title blocks when loaded in the project. The office address is a Generic Annotation Label using a Instance Parameter within the title block Family.

 

What I would like to achieve is once the user has set the office address from a drop down menu, this setting continues to be applied to every sheet there after.

 

Any suggestions would be most welecome

0 Likes
544 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

Dear L_Barnett,

 

Thank you for posting your query here in public.

 

So, you have a title block that is used in all projects?

 

And you have a list of different addresses to use in the tile block?

 

You wish to pick one of them, and use it forever after?

 

If so, you might just as well only have one single address in the frst place  🙂

 

Anyway, my first suggestion to any programmer for any task is to apply the KISS principle: keep it simple!

 

In this case, split the problem up into separate tasks.

 

It might be simplest to start by implementing two external commands:

 

One has nothing whatsoever to do with Revit or its API: it simply displays a dropdown list of the addresses to use and selects one of them as the default address.

 

The second grabs the default address defined by the first command and applies that to the title block.

 

To determine how this can be achieved, I would again recommend going through a couple of basic steps. These also apply to almost all Revit programming tasks:

 

 

In this case, all of these steps should be pretty simple.

 

I hope this helps.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 3

Anonymous
Not applicable

Hi Jeremy,

 

Thanks for your quick response again 

 

I have the office address as a drop down menu within Revit. My reason for this was to limit the number of title blocks and Project templates I have to create in the first place. With 14 offices it gets very confussing. Easier to build content for one office then roll it out.

 

The issue I was having was the Technicians complanining they had to set the office address everytime a new sheet was added to the project.

 

I will take a look at your suggestions and see how I get on.

 

Lee

 

 

 

 

 

 

0 Likes