try
% Connect to ETABS
ETABSObject = actxserver('CSI.ETABS.API.ETABSObject');
% Attempt to access the SapModel property to check if ETABS is open
SapModel = ETABSObject.SapModel;
% Prompt the user to select joints in ETABS
msgbox('Please manually select the joints in ETABS to rename.', 'Info', 'modal');
pause(5); % Allow time for user to select joints
% Get the selected joints
selectedJoints = SapModel.SelectObj.GetAllPoints;
% Check if any joints are selected
if isempty(selectedJoints)
error('No joints selected. Please select joints in ETABS before running the script.');
end
% Sort the selected joints by their current labels
[~, idx] = sort({selectedJoints.Name});
selectedJoints = selectedJoints(idx);
% Rename joints to consecutive labels (1 to 1500)
for i = 1:length(selectedJoints)
newLabel = num2str(i);
SapModel.PointObj.SetLabel(selectedJoints(i).Name, newLabel);
disp(['Joint ' selectedJoints(i).Name ' renamed to ' newLabel]);
end
I am getting this error,
Error: Undefined function 'GetAllPoints' for input arguments of type 'Interface.CSi_Application_Programming_Interface__API__v1_cSelect'.