Open 3dmod opened 1 month ago
Logged as: SKEXT-4182
Hello, I'm not sure I understand the issue. You are saying that initially upon creating a group that it shows that it is unlocked, then after you lock it it shows that it is locked? Is the issue that upon loading an existing file that the locked state of the group does not report correctly? Your code snippet makes a new group each time it is run so I am unsure of what you are looking for.
I also noticed this issue in your code layer = doc.pages.first
should be layer = doc.layers.first
.
I want to take the following steps;
So part one of the issue is that after I create the group and lock it does not lock.
So I set up a simplified script to troubleshoot with the following steps
Thank you for pointing out the error in the code. It is correct in my local troubleshooting version and does not change the status of the issue.
I want to take the following steps;
- create a group
- lock the group (Does not work)
In my testing, step 2. is working as expected. The group is locking and subsequently reporting as locked. Unlocking and reporting the locked state afterwards also works for me locally. I am not sure why we are not seeing the same results.
Here is a screen recording with the exact code show above not working.
I even tried using a SU made template as a possible reason without any change in outcome.
I had to downsize to 720p to make it under the 10mb GitHub file size limit.
I can email it to you if you need high resolution.
https://github.com/SketchUp/api-issue-tracker/assets/76130464/a5f42167-2fdd-4b9f-a309-042dc0d096ef
Thank you for the video. I was able to reproduce this through LayOut itself - Group entities are not serializing their locked status at all, and seemingly have not done so for a long time, if ever.
Locked= and Locked? methods are broken for the Layout::Group Class
The following code will give the following results even though the entity is not locked when you open the file
Result
Code
macOS Sonoma 14.4.1 (23E224) SketchUp Version 24.0.483