« Transaction Migration Errors | Main | Get Element Type »

August 05, 2010

Comments

Hi Jeremy,

I'm new to REVIT API, but was thinking about something:
"Is there eny way of adding XData to the families, so that we can manipulate then later on AutoCAD, after the DWG export on Revit? "

Thank you..

Felipe
SP-Brazil

Dear Felipe,

Sure there is a possibility for a Revit add-in to add its own arbitrary data to Revit database elements. It is called 'shared parameters' and is accessible both through the user interface and the API.

I am not sure how well the shared parameter data will survive the export to AutoCAD, though. If all else fails, you can always implement your own export mechanism.

Cheers, Jeremy.

Hi Jeremy,

Very nice blog, I've been following you for a long time now, keep up!! :) This particular post remind me a problem of mine; I would like to obtain the scale of the exported view. I've searched through the REVIT_DICTIONARY inside the dwg but couldn't find any clue. Is there any xrecord/xdata which may provide the scale? Or you may have other ideas to get it or a different way to export it to dwg...

My purpose is to make some automatic adjustments depending on the scale of the exported view by means of lisp.

Thanks,
Serhan

Dear Serhan,

Thank you for your appreciation. Glad you like it.

No, I am not aware of any such information.

Actually, it may even be hard to find within Revit itself.

As an approximation in Revit, I would suggest iterating over all elements returned by a filtered element collector specific to the given view and summing up all their bounding boxes to obtain the model extents displayed by the view.

The size of the view in paper space is easy to determine:

http://thebuildingcoder.typepad.com/blog/2014/04/determining-the-size-and-location-of-viewports-on-a-sheet.html

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