Complete the code to create a new layout tab named 'SitePlan'.
layout = doc.Layouts.Add([1])You need to pass the layout name as a string with double quotes.
Complete the code to set the current layout tab to 'Floor1'.
doc.ActiveLayout = doc.Layouts[[1]]You must use the layout name as a string to access it by name.
Fix the error in the code to delete a layout tab named 'OldLayout'.
doc.Layouts.[1]("OldLayout")
The correct method to delete a layout is 'Remove' with a capital R.
Fill both blanks to rename the layout tab 'Sheet1' to 'Drawing1'.
layout = doc.Layouts[[1]] layout.[2] = "Drawing1"
You access the layout by its name as a string and set its 'Name' property with capital N.
Fill all three blanks to list all layout tab names in the document.
names = [layout.[1] for layout in doc.Layouts if layout.[2] != [3]]
We get the 'Name' of each layout and filter out deleted ones by checking 'IsDeleted' is False.
