sorry for this...whops
I changed the code but it still recalls an error...
` # Load the component definition
model = Sketchup.active_model
def_list = model.definitions
def_path = Sketchup.find_support_file "gelander.skp", "Components/Pfisterer"
comp_def = def_list.load def_path
Create the component instances
ents = model.entities
inst1 = ents.add_instance comp_def, [0, 0, 0]
inst1.definition.set_attribute('dynamic_attributes','weight',0)
inst1.definition.set_attribute('dynamic_attributes','position','')
snaptoface2=ents.add_face [0.01.m,0.15.m,1.65.m],[0.01.m,0.65.m,1.65.m],[0.01.m,0.65.m,1.7.m],[0.01.m,0.15.m,1.7.m]
snaptoface2.material =[128, 0, 128]
inst1.definition.behavior.is2d=true
inst1.glue_to=snaptoface2`