Bill,
Were you ever able to save the .SKP where you wanted them?
I tried saving it with the base name (xxx.skp) and no path. I don't think it resaved it, althoug it returned true.
sname = File.basename(sfile)
model.save(sname)
I then saved it with new names using:
component_name = File.basename(sfile,".*")
sname = component_name + "_new.skp"
model.save(sname)
This seems to have worked (saving a new SKP in the original folder)
@unknownuser said:
TIG, that is great. Works like a charm. Just run it, then run purgeall and poof.
Thanks.
At least that works ! Now for Roof.rb glitches. Perhaps you should all go to church and retry it ?
I see, the methods listed in the File class are actually defined in the ftools.rb file. Also, the docs recommend using FileUtils.rb over ftools.rb.
Thanks. I was toying with the idea of cleaning up .skb and AutoSave files from the the user's model folder.
That's not a bad idea as an alternative, TIG. I've thought of something similar myself, though mine was admittedly less sophisticated. (I was just going to change the edge colours and throw away the original value.) I'll certainly add that to my growing list of fall-back plans.
Thanks again for all the input,
Kevin
Your right, I dont think thats what I had in mind. There are times that I draw something only to find that the geometry is wrong when I change the view. So rather than scrap the piece all together, I start "undoing" what I did and backing out of the errors till I get back to where I can start again. There are only so many times that Undo will work, and yes, you think I would catch it before it gets that far, lol.
Thats why I was thinking I saw an Undo script that would back up many times.
Thanks for the response
Mike
that means that the user must export as OBJ first - not acceptable
so I think I will use TextureWriter as there is no Ruby method that points to the .skm file to do a .zip parsing of .xml files. urgh
thanks anyway
You need to use camera.set. The vector from the target to the eye is the direction.
m=Sketchup.active_model
view=m.active_view
camera=view.camera
v1 = (camera.target - camera.eye).normalize
v2 = camera.direction.normalize
p v1 == v2
@daiku said:
gourp.entites will give you the array of entities in the group. Then run through all the items in the array, and look for your face.
I just want to OPEN a group. I am using group.entities.. but it is not the case. uvHelper behaves different INSIDE.
There is method in model called close_active. But I cannot find make_active. How can I achieve it?
In other words - is there way to do outliner double click in Ruby?
Tomasz
@unknownuser said:
I have no idea. I am working on XP.
Thanks anyway.
Just upgraded to a new PC - Core 2 Quad with 2Gb RAM - but it runs Vista...
Vista seems to be the problem...
I have found it! Silly me. I have placed view.invalidate at the end of draw method
def draw(view)
if( @ip1.valid? )
if( @ip1.display? )
@ip1.draw(view)
@drawn = true
end
end
if( @ip2.valid? )
@ip2.draw(view) if( @ip2.display?)
self.draw_geometry(@ip1.position, @ip2.position, view)
view.invalidate #WRONG!
@drawn = true
end
end
Each time UI.messagebox was invoked SU called draw method which erased MB from the view.
Thanks
Tomasz
Hmmm... there seem to be a problem. Now it doesnt work the way it did when I tested it.
I'll try it more at work tomorrow.
For now you can use the other script, jsShadowControl, to turn shadow casting and shadow receiving on or off. Even for non transparent objects.
Wow, those are some seriously long transition times. If you're working with a large site model, I'd suggest something along the lines of 10-20m/s for motion speed. Of course, it all depends on whether you want fly-by, drive-by, or walk-by speed, and the physical size of the site/campus.
As it is, you can use the multiplier. Select all scenes, use 1/5 as your multiplier, then click the "Apply to Selected TT", then click "Save Changes". That will speed things up considerably.
The Transition Time is a time in seconds that it takes to transition from one scene to the following scene. Your TT of 80 seconds for scene 1 is a LONG TIME. That's why I suggested using 1/5 for your multiplier - it will yield a 16 second TT (and other selected scenes will also be reduced by 80%).
Hope that helps...
In my office I have Free SU 6. I can check - unless someone will be faster than me. At home I cannot install Free SU6 for I have Pro and they don't run parallel with each other.