### Displaying Selected Object Source ID in Altium PCB Source: https://github.com/brettlmiller/altium-delphiscripts/blob/master/PCB/CopySUIDToClipBoard/RunScript-UUID.txt This script snippet retrieves the SourceUniqueId of the first selected object on the current PCB board and displays it using a message box. It includes a check to ensure at least one object is selected before attempting to access its properties. If no objects are selected, no message will appear. This script requires access to the PCBServer and its associated board and object properties. ```delphi Text=Begin ShowMessage(PCBServer.GetCurrentPCBBoard.SelectecObject(0).SourceUniqueId); end; ``` ```delphi Text=Begin if (PCBServer.GetCurrentPCBBoard.SelectecObjectCount > 0) then ShowMessage(PCBServer.GetCurrentPCBBoard.SelectecObject(0).SourceUniqueId); end; ``` ```delphi Text=Var B;Begin B:= PCBServer.GetCurrentPCBBoard;if(B.SelectecObjectCount > 0) then ShowMessage(B.SelectecObject(0).SourceUniqueId); end; ``` -------------------------------- ### Copying Selected Object Source ID to Clipboard in Altium Source: https://github.com/brettlmiller/altium-delphiscripts/blob/master/PCB/CopySUIDToClipBoard/RunScript-UUID.txt This script snippet copies the SourceUniqueId of the first selected object on the current PCB board to the clipboard. It first checks if any objects are selected. If objects are selected, it creates a TClipboard object, retrieves the board information, and assigns the SourceUniqueId to the clipboard's text property. This requires the PCBServer and TClipboard components. ```delphi Text=Var B,C;Begin C:=TClipboard.Create;B:=PCBServer.GetCurrentPCBBoard;C.AsText:=B.SelectecObject(0).SourceUniqueId;end; ``` ```delphi Text=Var B,C;Begin C:=TClipboard.Create;B:=PCBServer.GetCurrentPCBBoard;if(B.SelectecObjectCount>0) then C.AsText:=B.SelectecObject(0).SourceUniqueId;end; ``` -------------------------------- ### Relink Schematic and PCB Footprints in Altium (Delphi) Source: https://github.com/brettlmiller/altium-delphiscripts/blob/master/Project/PrjLibReLinker/Readme.txt Scripts for relinking schematic documents and PCB footprints. CompSourceLibReLinker.pas is for single document actions, while PrjLibReLinker.pas iterates over all project documents for comprehensive relinking. ```pas (* CompSourceLibReLinker.pas *) procedure SchDocLibRelinker; begin // Implementation for SchDoc/Lib relinking end; procedure PcbDocFPRelinker; begin // Implementation for PcbDoc FP relinking end; (* PrjLibReLinker.pas *) procedure ProcessProjectLibraries; begin // Implementation to iterate over SchLib, SchDoc, PcbDoc end; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.