Hi!
I have tried to invoke the duplicate method (https://www.revitapidocs.com/2023/0cb1793f-1df0-d5b4-3b72-8d468b80199e.htm) on the Level 1 view in Floors Plan with Id 312 inside the default project "RAC_basic_sample_project.rvt" that comes with the Revit 2023 installation.
To my surprise, the method doesn't return a new Id for the duplicate view. Instead it returns the same Id as the view I'm trying to duplicate (in this case 312).
Does anyone know what could be causing this behavior? Thank you very much for your answers
Solved! Go to Solution.
Solved by naveen.kumar.t. Go to Solution.
Hi @b.molinaSGEZ5 ,
I tested it on my end.
I am not able to reproduce the issue.
New duplicated ViewPlan/view is having new id(not 312).
Could you please share the sample code you used?
private View GetViewFloorPlanModel()
{
var viewRoom = ViewUtilities.DuplicateView(this.Document, this.Document.ActiveView);
return viewRoom;
}
public static View DuplicateView(Document doc, View view)
{
var duplicatedView = view.Duplicate(ViewDuplicateOption.WithDetailing);
return doc.GetElement(duplicatedView) as View;
}
Hi @b.molinaSGEZ5 ,
I tested the sample code you shared.
I am still unable to reproduce the issue.
Please see the attached screenshot.
Hi, sorry for the delay,
Clean uninstall following this instructions (https://knowledge.autodesk.com/support/revit/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-Com...
Can't find what you're looking for? Ask the community or share your knowledge.