Dynamic non-component
-
I wanted to use this with my pipe tool, but wasn't sure how. I guess that this is as good of a start as any:
-
I'm not sure what you're trying to achieve...
This might help [a bit] - it traps errors ..........class MyEntitiesObserver < Sketchup;;EntityObserver def onChangeEntity(entity) width = entity.bounds.width.to_f model = Sketchup.active_model entities = model.active_entities pts = [] pts[0] = [0, 0, 0] pts[1] = [width, 0, 0] pts[2] = [width, width*2.0, 0] pts[3] = [0, width*2.0, 0] begin face = entities.add_face pts face.add_observer($mmmmmmmmmmmmmmmmmmmmm) entity.edges.each{|i| i.erase! if not e.edges[1]} rescue puts 'error' face.remove_observer($mmmmmmmmmmmmmmmmmmmmm) face.add_observer($mmmmmmmmmmmmmmmmmmmmm) end end end model = Sketchup.active_model entities = model.active_entities pts = [] pts[0] = [0, 0, 0] pts[1] = [1, 0, 0] pts[2] = [1, 2, 0] pts[3] = [0, 2, 0] face = entities.add_face pts $mmmmmmmmmmmmmmmmmmmmm=MyEntitiesObserver.new() face.add_observer($mmmmmmmmmmmmmmmmmmmmm)I suggest you rename your observer as something less obvious... i.e. others might have used it !
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement