Part of a graph I’m working on requires the duplication of the 3D view, I’ve been following using the following post Call View to Open as the basis for my graph by I’m encountering an error I can’t seem to resolve.
> #Copyright 2016. All rights reserved. Bimorph Consultancy LTD, 5 St Johns Lane, London EC1M 4BH www.bimorph.co.uk
> #Written by Thomas Mahon @Thomas__Mahon firstname.lastname@example.org Package: bimorphNodes
> #GitHub: https://github.com/ThomasMahon/bimorphNodes/
> #Follow: facebook.com/bimorphBIM | linkedin.com/company/bimorph-bim | @bimorphBIM
> import clr
> import RevitServices
> from RevitServices.Persistence import DocumentManager
> from RevitServices.Transactions import TransactionManager
> import Autodesk
> from Autodesk.Revit.DB import *
> doc = DocumentManager.Instance.CurrentDBDocument
> uidoc = DocumentManager.Instance.CurrentUIDocument
> view = UnwrapElement(IN)
> uidoc.RequestViewChange( view )
Any input would be grateful
@EddieSaez can you format your code and post an image of the python script?
The python script is in the post…
Unsure about formatting it for the post
My guess is that it might be in the header part, a new line was made outside of the comment. Can you take a screenshot on the inside of your python script, as shown in dynamo?
@EddieSaez it looks good to me. Post your dyn (or a link) please
Dyn file as requested… BTW thanks for assisting me with this.
DuplicateView.dyn (22.4 KB)
The python node is working for me in Dynamo 2.0 with Revit 2018. Sorry, can’t find what’s wrong. Try recreating the python node maybe?
revit version? Dynamo Version?
Interesting… I’m Revit 2019 with Dynamo 2.0
Wonder if that’s the issue
It works with Revit 2019 and Dynamo 2.02 but just with one view.
I think you are providing a list. Let me see if I get the same error with a list
I get a different error if using a list as input, the ‘expects a view, got list’
yes that’s the error I get
Well the idea is to duplicate the 3D view and then make the duplicate the active view.
that’s not the error in your initial screenshot.
You need to loop then
for i in view:
uidoc.RequestViewChange( i )
apologies, I had been trying somethings to resolve it, hence the different error
I give up… I’ve eliminate the errors, but it just won’t open the duplicated view
Thanks for your help… appreciate it
DuplicateView.dyn (13.1 KB)
This works for me. I had to take out the duplicate options node as it kept giving me errors everytime I opened the graph, making me have to remake the node. Instead I just use a string
"Duplicate" and it works.
me too. I had to install the latest version of the package.
DuplicateView_SD.dyn (21.9 KB)
@EddieSaez It works. Try to close and reopen the dynamo graph. Run manual
that works … thank you for your assistance, it’s very much appreciated