Remove control points in fragment slab?

@jack3661mao ,

i can just find in datashapes add points but not delete… option is reset Shape…

#Copyright (c) mostafa el ayoubi ,  2017
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com

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

clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

slab = UnwrapElement(IN[0])
sshape = slab.SlabShapeEditor
pts = IN[1]
_reset = IN[2]

UIunit = Document.GetUnits(doc).GetFormatOptions(UnitType.UT_Length).DisplayUnits

TransactionManager.Instance.EnsureInTransaction(doc)
watch = []
if _reset:
	sshape.ResetSlabShape()
	
for i in pts:
	watch.append(sshape.DrawPoint(XYZ(UnitUtils.ConvertToInternalUnits(i.X,UIunit),UnitUtils.ConvertToInternalUnits(i.Y,UIunit),UnitUtils.ConvertToInternalUnits(i.Z,UIunit))))

TransactionManager.Instance.TransactionTaskDone()


OUT = slab

KR

Andreas

3 Likes