复制刻字操作
手动时,报粘贴对象失败:
用代码执行,报内部错误:
Dim destinationObject As NXOpen.CAM.CAMObject = CType(NXOpen.Utilities.NXObjectManager.Get(list(i)), NXOpen.CAM.CAMObject) Dim objectsToBeMoved(0) As NXOpen.CAM.CAMObject objectsToBeMoved(0) = destinationObject workpart.CAMSetup.BufferObjects(CAM.CAMSetup.View.ProgramOrder, objectsToBeMoved) Dim objects() As CAM.CAMObject = workpart.CAMSetup.CopyObjects(CAM.CAMSetup.View.ProgramOrder, objectsToBeMoved, destinationObject, CAM.CAMSetup.Paste.After) destinationObject = objects(0)
为了这个问题,找了好几天,各种查资料,始终没有解决。
后来才发现注释(note)是有名称的。删除名称后,就可以复制操作了。