Copy, paste in place and change to a different type with python

@JocoYo
try this

import sys
import clr

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

import System 
from System.Collections.Generic import List

toDoList = lambda x : x if hasattr(x, '__iter__') else [x]
lstWall = toDoList(UnwrapElement(IN[0]))
wallToPlace = UnwrapElement(IN[1])
#
outchanged = []
TransactionManager.Instance.EnsureInTransaction(doc)
for w in lstWall:
	if w.CurtainGrid is None:
		eId = List[ElementId]([w.Id])
		newwallSetId = ElementTransformUtils.CopyElements(doc, eId, XYZ.Zero)
		for newwallId in newwallSetId:
			newwall = doc.GetElement(newwallId)
			newwall.WallType = wallToPlace
		outchanged.append(newwall)
TransactionManager.Instance.TransactionTaskDone()		

OUT = outchanged
2 Likes