Autodesk Revit API
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
An object's Instance Id into a schedule in Revit Architectu re
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I wish to get object's Instance Id numbers into the Revit Architecture schedules. I can obtain them using either the DB Link or the standard ODBC export, but the Instance Id's are not available in schedules. Is there a code that I can put into a schedule field that will transfer the Instance ID of the object into the shedule?
Solved! Go to Solution.
Re: An object's Instance Id into a schedule in Revit Architectu re
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
The workaround is you add a shared parameter to the target element, and then assign the element's Id value to this shared parameter.
Then create a schedule and include the shared parameter.
Hope this helps.
Joe Ye
Developer Technical Services
Autodesk Developer Network
Re: An object's Instance Id into a schedule in Revit Architectu re
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello Joe,
Thank you for your post. How do I actually assign the element's Id value to the shared parameter? Is it a formula? What are the steps for assigning the Id to the parameter?
Re: An object's Instance Id into a schedule in Revit Architectu re
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi explosive369,
There is no need for a formula, just define a shared parameter of type integer and set its value like this:
your_element.get_Parameter(your_parameter_name).Se
That's it.
Best regards,
Revitalizer
Re: An object's Instance Id into a schedule in Revit Architectu re
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you Revitalizer for your post.
With reference to the attached image, I have tried including the recommended code in both project and object family files. Ultimately, neither approach produced the six digit Revit Instance Id for each object within the schedule. Are the codes that I created incorrect?
Recommended code = your_element.get_Parameter(your_parameter_name).Se
Attempted code 1 = ExtSgl (3).get_Parameter(test_id).Set(door.Id.IntegerValu
Attempted code 2 = door.get_Parameter(test_id).Set(door.Id.IntegerV
To reiterate, ultimately, I wish to be able to import the six digit Revit Instance Id's into schedules for every object. I am able to obtain them using the ODBC and DB Link options but I wish input them into schedules.
Re: An object's Instance Id into a schedule in Revit Architectu re
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: An object's Instance Id into a schedule in Revit Architectu re
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: An object's Instance Id into a schedule in Revit Architectu re
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
