First of all, please put your code inside a code tag. Like this:
# Prompt for parameters and then insert windows
def WinDoor.create
model = Sketchup.active_model
model.start_operation("Create WinDoor", true)
windoor_instance = WinDoor.new
# puts "in WinDoor.create and windoor is #{windoor_instance}"
definition = windoor_instance.entity
# puts "in WinDoor.create and definition is #{definition}"
Sketchup.active_model.place_component definition, true
model.commit_operation
end # WinDoor.create
The start_operation has 3 more parameters (documentation):
If you have a start_operation and, before doing a commit, you call a method that have another start and commit operation, then that second commit will commit the first operation too.
Maybe the initialize of your WinDoor.new have some commit operation.
To resolve that (if it’s the case) you could just apply the 3rd and 4st boolean paremeters which “merge” the operations that occurs after and before (respectively) into one.