![](/profiles/wavemetrics/themes/wavemetrics/logo.png)
Relocate Object From One Page Layout To Another
![](/sites/default/files/styles/thumbnail/public/default_images/Artboard%201_1.png?itok=jeHOCIXy)
![](/profiles/wavemetrics/themes/wavemetrics/images/icons/employee-icon.png)
hrodstein
// Relocates a page layout object from one layout to another. // If destObjectName is different from sourceObjectName, renames the object during the relocation. // In this case, it is up to you to make sure that destObjectName is valid and not in conflict. Function RelocateLayoutObject(sourceLayoutName, sourceObjectName, destLayoutName, destObjectName) String sourceLayoutName, sourceObjectName String destLayoutName, destObjectName String sourceInfo = LayoutInfo(sourceLayoutName, sourceObjectName) RemoveLayoutObjects /W=$sourceLayoutName $sourceObjectName if (CmpStr(sourceObjectName,destObjectName) != 0) DoWindow /C /W=$sourceObjectName $destObjectName endif Variable fidelity = NumberByKey("FIDELITY", sourceInfo) Variable frame = NumberByKey("FRAME", sourceInfo) Variable trans = NumberByKey("TRANS", sourceInfo) Variable left = NumberByKey("LEFT", sourceInfo) Variable top = NumberByKey("TOP", sourceInfo) Variable width = NumberByKey("WIDTH", sourceInfo) Variable height = NumberByKey("HEIGHT", sourceInfo) Variable right = left + width Variable bottom = top + height String objectType = StringByKey("TYPE", sourceInfo) AppendLayoutObject /W=$destLayoutName /D=(fidelity) /F=(frame) /R=(left,top,right,bottom) /T=(trans) $objectType $destObjectName End
![](/sites/default/files/forum.png)
Forum
![](/sites/default/files/support.png)
Support
![](/sites/default/files/gallery.png)
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More