Are you familiar with regular expressions?
azuby
Are you familiar with regular expressions?
azuby
If I remember right, I had a fully installed Ruby on my PC and took the REXML lib from it. The directory contains 55 files and five folders. I loaded it this way from my script:
require 'rexml/document' unless defined? REXML
If you also want to load this way you have to make sure that the Ruby interpreter search in the right place. Put the REXML folder to Plugins or Tools folder - should work with the above code.
To make sure that your script only runs if REXML is loaded, put this condition to your codee:
if defined? REXML
# YOUR CODE HERE
else
UI.messagebox "REXML is missed, can't load plugin."
end
Sorry for my late answer - I'm moving from town to town at the moment.
azuby
I also coded something similar this night reusing the code form "Select all with same orientation" (SAWSO) It's should be simple to integrate the functionality to select more than one line, Chris.
azuby
Maybe you want to try FFlipper - http://errorinitus.de > Downloads - at the moment, it explodes components No time to fix
Does the following:
azuby
You could overwrite the add_toolbar and toolbar_names methods of Sketchup. But you have to make sure that your plugin is the first loaded.
azuby
Hey folks,
does anyone of you can explain, why all validation procs (Menu#set_validation_proc) are called numerous times when I only move the mouse? (Sketchup 6 and 7)
azuby
Next thought: Using mailto and open the directory containing the .skp file. Unfortunately the user has to drag'n'drop the file into the email window.
azuby
@jim said:
Thomas, what if a definition exists in the DefinitionList but does not have an instance in the model? Do you still want its entities? I guess it depends of what the use of the collection is.
Use ComponentDefinition#instances:
Sketchup.active_model.definitions.each do |d|
if inss = d.instances # line is correct!
inss.each do |ins|
# ...
end
end
end
azuby
$stdout points to an IO object. A File object is an IO object too:
File.ancestors #=> [File, IO, File::Constants, Enumerable, Object, Kernel]
azuby
Sorry man - it was just the term "using classes as objects", this is meta-programming. In most of the scripts the programmers use classes to build objects.
Modules are kind of light classes, because you can not make objects of them on the direct way.
azuby