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: 

Inserting Drafting Views From Another File

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
mkrausMQRRX
261 Views, 4 Replies

Inserting Drafting Views From Another File

My company has a 'master' Revit project with all of our details in it (All details are drawn in drafting views). I am trying to write a script that copies those details into another project-basically performing an insert views from file function. I have been working on this for awhile but have not been having any luck. For now, I am just trying to load in one drafting view. Below, I have shown my code and the error that dynamo is giving me. Any help would be much obliged! 

mkrausMQRRX_0-1655910543247.png

mkrausMQRRX_1-1655910733084.png

 

4 REPLIES 4
Message 2 of 5
mkrausMQRRX
in reply to: mkrausMQRRX

I just figured it out! Here is what I did incase anyone is having the same problem.

mkrausMQRRX_0-1655912744340.png

 

Message 3 of 5
mkrausMQRRX
in reply to: mkrausMQRRX

update: this will not copy anything else on the view, just the view itself.

Message 4 of 5
RPTHOMAS108
in reply to: mkrausMQRRX

No use:

ElementTransformUtils.CopyElements(SourceView, ICollection<Of ElementId>, DestView, Transform, CopyPasteOptions)

 

i.e.

Create empty drafting view in destination document.

Collect elements from drafting view in source document and copy them to newly created destination view.

 

The overload you used is mainly for model elements i.e.

"This method can be used for copying non-view specific elements only"

Message 5 of 5
mkrausMQRRX
in reply to: RPTHOMAS108

Thank You! That is actually what I ended up doing, I just never got around to posting about it. I also wound up converting the elements on the drafting view into a group and moving that instead of moving each element individually. Not really sure that that is necessary but it gets the job done! 

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

Post to forums  

Forma Design Contest


Rail Community