[英]Remove/Delete/Undo Parts
I have splitted the wall into parts. 我把墙壁分成几部分。 Now I want to remove the parts and keep the original wall.
现在,我要删除零件并保留原来的墙。 How do I remove/delete/undo the parts that have already been created?
如何删除/删除/撤消已经创建的零件? I have the partids which I would like to remove.
我有要删除的partids。
.ActiveDoc.Delete(partid) doesn't work out and throws an error. .ActiveDoc.Delete(partid)无法正常工作并引发错误。
You can accomplish this by deleting the PartMaker associated with the source element: 您可以通过删除与源元素关联的PartMaker来完成此操作:
revitDoc.Delete(PartUtils.GetAssociatedPartMaker(revitDoc, SourceElementId).Id);
Have fun! 玩得开心!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.