Is it possible to change default "Enter text" text for Text tool?
Posts made by Viskiz
-
Text tool default text
-
RE: Texture from url?
I solved in on Windows platform.
In my script installation I included ruby lib files needed for http, so users will have them after installing script.
The code followed in script:$LOAD_PATH << File.join(MY_PLUGIN_HOME, "bin", "rblib")
Sketchup::require 'uri'
Sketchup::require 'net/http'Installer for MAC OS should have different ruby library files I think. I haven't MAC yet, so I can't tell any more. Let me know if you solve it.
-
RE: Weird bug with WebDialog and Flash
I've just noticed, that the problem still remains with the 'Enter' key. Though it works in IE, but it doesn't if it's opened via Sketchup web dialog. Any ideas?
-
ComponentDefinition.instances strange behavior. Bug?
I have two ComponentDefinitions (d1 and d2) in model. Each of them has one instance. Strange thing begins, when I make a new Component of the both instances and then explode it. Then d1 and d2 instances returns me array of length 2.
d1.instances -> #[#Sketchup::ComponentInstance:0x6ba89c4]
d2.instances -> #[#Sketchup::ComponentInstance:0x9bc96e4]Using mouse I select both instances, make Component of them and explode it.
d1.instances -> [#Sketchup::ComponentInstance:0x6ba89c4, #Sketchup::ComponentInstance:0x9bc2164]
d2.instances -> [#Sketchup::ComponentInstance:0x9bc96e4, #Sketchup::ComponentInstance:0x9bc1fd4]but there is no any new instances in model, outliner does not show them too. Is it a bug or I misunderstand something? Maybe there is some purge function for d.instances or something?
-
RE: Weird bug with WebDialog and Flash
I'm on PC.
The problem is solved , thank you, JD Hill!
-
RE: Weird bug with WebDialog and Flash
Hi!
I have the same problem with silverlight. The difference is that letter and number keys does not work, but space, backspace, arrow, home and etc. keys work. Does anybody have solution for this? -
RE: Class similar to Length class
@jim said:
You can get a Length from a String:
"100cm".to_l
I'm interested how Length class is made? In String class it should look like this:
def to_l Length.new(self) end
but Length.new throws 'undefined method' error. So how to_l works?
P.S. Thanks for reminding me about modules. I've completely forgotten about them
-
Class similar to Length class
Hello
I'd like to create Area and Volume classes derived from the Float. These classes should be similar to Length class. How conversion from String to Length is made? Length.new() is not implemented, so it seems it doesn't have constructor? How it should be done?
-
RE: Texture from url?
I could not find such function, that save file without interruption. I don't think it's possible.
-
RE: Texture from url?
@tig said:
API can use the texture image file from a temp folder.
You need to download the image file to that folder from the url.
See Ruby on Rails http://www.ruby-forum.com/topic/133981
http://snippets.dzone.com/posts/show/3994
or
http://crunchlife.com/articles/2009/01/07/another-ruby-image-scraperThese links requires additional ruby libraries that regular Sketchup users does not have and may find difficult themselves to install them. I'd like to find a way to do this without using Sketchup unsupported Ruby libraries.
@attachment_data = open(url) #throws exception "Invalid argument", cause it requires 'open-uri' that Sketchup does not have.
@unknownuser said:
or here's some java script to download an image in a webdialog http://www.codingforums.com/archive/index.php/t-34531.html
I need to get the file without interrupting user with "Save as" or another yet additional dialog
-
RE: Texture from url?
Yes, i had this idea, but how to know the name and location of that tmp?
-
RE: Texture from url?
I have materials in web server and this script is used to create and apply material from server, using WebDialog. Is there a vay to create texture using webdialog, XMLHttpRequest and Javascript?
-
Texture from url?
Is there a way to load texture image from given url? Creating new texture using Sketchup Materials dialog is possible to paste image URL. Sketchup downloads image and makes texture. Unfortunetally it does not in ruby script. I've tried using NET:Http, or Open-uri libraries. It's OK till ruby is installed, but it does not work on computers with no ruby installed. Can someone help please?
model = Sketchup.active_model materials = model.materials m = materials.add "Joe" #this works m.texture = "c;\\Materials\\Carpet.jpg" #but this does not m.texture = "http://code.google.com/images/code_logo.png"