Hello AcesHigh
Thank you so much for your interest !! It's a surprise that many people watched my videos. Actually , I did YouTube for a good memory , and applying for a job. Now, I'm preparing documentation for this time ,and looking for some experts to lead me here because I'm not a programmer. I hope there's a possibility to distribute soon.
Latest posts made by pingpink
-
RE: How to load all RBS files ?
-
RE: About NameError: wrong constant name
Thank you kindly, Trogluddite and Dan Rathbun
I understand from reading your advice. Maybe, it's about class reference.
These are the 3 ways I tried to do, I can't find the problem in a code yet.renderer = Kernel;;HTMLRendererP.new(result_hash['round_dimensions'].to_s == "on" ? true ; false) puts "[ToolWebUIP.add_callbacks('handle_run')] renderer; #{renderer}"
Error :
[ToolWebUIP.add_callbacks('handle_run')] parts: #PartListP:0xd9a0f28
Error: #<NameError: uninitialized constant Kernel::HTMLRendererP>
C:/Users/Windows8/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/CurtainWall/Export/CW_Panel/gui.rb:271:inblock in add_callbacks' -e:1:in
call'format_string = result_hash['format'].to_s renderer = @options['round_dimensions'] == 'on' ? true ; false eval("@options['format_string']").new( renderer ) puts "[ToolWebUIP.add_callbacks('handle_run')] renderer; #{renderer}"
Error :
[ToolWebUIP.add_callbacks('handle_run')] parts: #PartListP:0xded0ed8
**Error: #<NoMethodError: undefined method[]' for nil:NilClass>** C:/Users/Windows8/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/CurtainWall/Export/CW_Panel/gui.rb:275:in
block in add_callbacks'
-e:1:in `call'format_string = result_hash['format'].to_s renderer = Kernel.const_get(format_string).new(result_hash['round_dimensions'].to_s == "on" ? true ; false) puts "[ToolWebUIP.add_callbacks('handle_run')] renderer; #{renderer}"
Error :
[ToolWebUIP.add_callbacks('handle_run')] parts: #PartListP:0xddb8f00
Error: #<NameError: wrong constant name ["HTMLRendererP"]>
C:/Users/Windows8/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/CurtainWall/Export/CW_Panel/gui.rb:270:inconst_get' C:/Users/Windows8/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/CurtainWall/Export/CW_Panel/gui.rb:270:in
block in add_callbacks'
-e:1:in `call' -
About NameError: wrong constant name
Hi , I was wondering something in a code.
Today , I tested a code in SketchUp 2014 and I got an error about NameError: wrong constant name , const_get , block in add_callbacks in the line 270. But , older versions of SketchUp can be used.Error; #<NameError; wrong constant name ["HTMLRenderer"]> C;/Users/Windows8/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/Exporter/gui.rb;270;in `const_get' C;/Users/Windows8/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/ Exporter /gui.rb;270;in `block in add_callbacks' -e;1;in `call'
Here's an original code.
Line 270 : #renderer = Kernel.const_get(format_string).new(result_hash['round_dimensions'].to_s == "on" ? true : false)# This takes the name of a class and creates a new instance of it. format_string = result_hash['format'].to_s renderer = Kernel.const_get(format_string).new(result_hash['round_dimensions'].to_s == "on" ? true ; false)
After that I revised from (format_string) to be (HTMLRenderer.to_s)
There's no error pop-up when opening SketchUp , but it doesn't show a report text in a Web Dialog.
Meanwhile , it's surprise to work in SU8-2013. I don't know how to make a code correctly in a bracket > (HTMLRenderer.to_s)renderer = Kernel.const_get(HTMLRenderer.to_s).new(result_hash['round_dimensions'].to_s == "on" ? true ; false)
-
RE: How to load all RBS files ?
I revised in a new way , but I can load only the rbs files outside the folders.
Inside the folders are rb files as it called every time when opening SU 2014.In the 'scramble.bat' in part of folder , I wrote this way.
scrambler.exe CurtainWall/Components/Mullion_50/Mullion_50.rb scrambler.exe CurtainWall/Components/Transom_50/Transom_50.rb scrambler.exe CurtainWall/Components/Mullion_60/Mullion_60.rb scrambler.exe CurtainWall/Components/Transom_60/Transom_60.rb scrambler.exe CurtainWall/Components/Mullion_80/Mullion_80.rb scrambler.exe CurtainWall/Components/Transom_80/Transom_80.rb
This is in a loadprog.rb to call all rbs files.
require 'sketchup.rb' module CurtainWall this_dir=File.dirname(__FILE__) PATH=this_dir entries=Dir.entries(this_dir) ext=".rbs" Sketchup.load(File.join(this_dir,"CurtainWall_FStick.rbs")) Sketchup.load(File.join(this_dir,"CurtainWall_FUnitized.rbs")) Sketchup.load(File.join(this_dir,"CurtainWall_MainProgram.rbs")) Sketchup.load(File.join(this_dir,"cw_archtoolbar.rbs")) Sketchup.load(File.join(this_dir,"cw_rubytoolbar.rbs")) Sketchup.load(File.join(this_dir,"cw_report.rbs")) Sketchup.load(File.join(this_dir,"inputbox.rbs")) end
I don't know there is a problem inside my folders , or I wrote in scramble.bat wrong ?
-
RE: How to load all RBS files ?
I try to do , but I still don't know how to load all rbs files.
require 'sketchup.rb' Dir["pathFolder/*.rbs"].each do |filename| $path_root = "C;\Users\Windows8\AppData\Roaming\SketchUp\SketchUp 2014\SketchUp\Plugins" Sketchup;;load $path_root + "CurtainWall_FStick" Sketchup;;load $path_root + "CurtainWall_FUnitized" Sketchup;;load $path_root + "CurtainWall_MainProgram" Sketchup;;load $path_root + "cw_archtoolbar" Sketchup;;load $path_root + "cw_rubytoolbar" Sketchup;;load $path_root + "cw_report" Sketchup;;load $path_root + "inputbox"
or this method ?
require 'sketchup.rb' module CW # Menus and Toolbars unless file_loaded?( File.basename(__FILE__) ) m = UI.menu( 'Plugins' ) end PATH = File.dirname(__FILE__) # Load scrambled files. Sketchup;;require( File.join(PATH, 'CurtainWall_FStick.rbs') ) Sketchup;;require( File.join(PATH, 'CurtainWall_FUnitized.rbs') ) Sketchup;;require( File.join(PATH, 'CurtainWall_MainProgram.rbs') ) Sketchup;;require( File.join(PATH, 'cw_archtoolbar.rbs') ) Sketchup;;require( File.join(PATH, 'cw_report.rbs') ) Sketchup;;require( File.join(PATH, 'cw_rubytoolbar.rbs') ) Sketchup;;require( File.join(PATH, 'inputbox.rbs') ) end file_loaded( File.basename(__FILE__))
-
How to load all RBS files ?
Hello everyone,
I have some problems of loading my test plugin which is already scrambled for .rbs files. I don't understand the method to write .rb file to load all .rbs files in the folders. What should I write the loading code which I named it "cw_load.rb" ? There are many errors when I open in SketchUp 2014.
This is the code in cw_load.rb
#Sketchup;;require 'myFolder/myScript'
Sketchup;;require 'CurtainWall_FStick.rbs' Sketchup;;require 'CurtainWall_FUnitized.rbs' Sketchup;;require 'CurtainWall_MainProgram.rbs' Sketchup;;require 'cw_archtoolbar.rbs' Sketchup;;require 'cw_report.rbs' Sketchup;;require 'cw_rubytoolbar.rbs' Sketchup;;require 'inputbox.rbs' Sketchup;;require 'CurtainWall/Components/Mullion_50/Mullion_50.rbs' Sketchup;;require 'CurtainWall/Components/Transom_50/Transom_50.rbs' Sketchup;;require 'CurtainWall/Components/Mullion_60/Mullion_60.rbs' Sketchup;;require 'CurtainWall/Components/Transom_60/Transom_60.rbs' Sketchup;;require 'CurtainWall/Components/Mullion_80/Mullion_80.rbs' Sketchup;;require 'CurtainWall/Components/Transom_80/Transom_80.rbs'
-
RE: Trial Version
I'm so grateful TIG , I will study later after I finished evaluation forms. You are a very good mentor. Respect You.
-
Trial Version
Hi ,
I wonder the method of programming to make a plugin as a trial version. Is there any technique to add in a code , isn't it ?.I'm an architecture student , and I got a comment to do for a company testing.
Pink
-
RE: Question-How to link model components and generate on edges
Hi ,
I tried to adapt from the comment in my code , but it doesn't work yet for clicking lines then load external reference component (0,0,0) from component's file. I'm still finding how to link between the functions that the model can stretch or scales the component to the length as the edges. Here's my attached ruby , not sure what's error in the code as I'm a new to ruby ! Any suggestion , I would be appreciate!.
Thanks -
RE: Colored faces
Thank You again Dan and TIG ! . I understand an idea now.