no errors. its just imported in random coordinates and with the move icon pressed....
Posts made by borg.stef
-
RE: Taking a model to particular coordinates
-
RE: Taking a model to particular coordinates
still not taking the model at those coordinates after importion
-
RE: Taking a model to particular coordinates
Thanks for that.
Dear TIG, I tried your code and it's giving me this error
Error: #<NoMethodError: undefined methodinstances' for #<Array:0x7b62f2c>> C:/Program Files/Google/Google SketchUp 8/Plugins/examples/new2.rb:10 (eval):33:in
load'
(eval):33 -
RE: Taking a model to particular coordinates
Where are the specialized forums?? sorry I'm not very used to this site! THanks
-
RE: Taking a model to particular coordinates
yes yes that why my mistake in the last line. Thanks I will try this
-
Taking a model to particular coordinates
So I want to import a model and then take it to particular x and y coordinates in sketchup. I had to do this in 2 different programs since the model had to be selected before taken to the coordinates. The programs are shown below:
machine = "trial.3ds"
model = Sketchup.active_model
show_summary = true
status = model.import machine, show_summary
obj = Sketchup.active_model.selection[0]
pt = model.bounds.center.vector_to([x,y,0])
tr = Geom::Transformation.translation(pt)
model.transform!(tr)Is there a way to link these in 1 program?
Thanks -
Taking content from arrays to open a .3ds file
This is part of my program. what it is intented to do is get the first line of a txt file which is saved in a[0]. this will be the name of a .3ds model which than has to be imported in sketchup, but to do so, .3ds has to be added to the name. Something is wrong with my code I know it's something in the first line shown but I can't figure how to write it
correctly.machine = "a[0].3ds"
model = Sketchup.active_model
show_summary = true
status = model.import machine, show_summaryThanks
-
RE: How to add coordinate into SU api
how can i put a simple model in the required location? i did the following coding
model = Sketchup.active_model
pt = Geom::point3d.new(0,0,0)
tr = Geom::Transformation.new(pt)
model.transform!(tr)and it gives me this error:
#<NoMethodError: undefined method `point3d' for Geom:Module>thankss