Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create api to increment numbers and tag to specific shared parameter.

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
craigjonnson
722 Views, 3 Replies

Create api to increment numbers and tag to specific shared parameter.

I dont want a how to on this, i simply want to know if it can be done. Yes i know that there is software available that will renumber the mark value. Our purpose is to create an api that you select a run of pipework or ductwork that has been split up into manufactured lengths and assign an incremented number to each piece specific to its sheet. So that in the next sheet the number will start at 1 again, thus creating multiple warnings of duplicate marks.

Our tag will be a mulicategory tag that will be assgned to a text shared paramater. 

 

Can this be achieved? 

3 REPLIES 3
Message 2 of 4
sanjaymann
in reply to: craigjonnson

Hi,

 

Start a tarnsaction.Declare a counter as double and set it to 0. start looping all the elements on encountring the first element set its parameter mark value to counter and increment the counter by one.

 

Commit the transaction.

 

All done.

 

Thanks & Regards

Message 3 of 4
jeremytammik
in reply to: craigjonnson

Dear Craigjonnson,

 

Thank you for your query.

 

As you can deduce from Sanjaymann's friendly and helpful answer, the short answer to your question is:

 

Yes, this can definitely be achieved programmatically.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

Message 4 of 4
craigjonnson
in reply to: sanjaymann

Hi Sanjayman,

 

Thank you very much for your detailed reply. I am just getting into the development API side of revit, but I do like to figure these things out. That's half of the fun. However, your reply has allowed myself to fast track through this process and I appreciate the time you have taken for that.

 

Regards

 

Craig J

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community