sketchucation logo sketchucation
    • Login
    1. Home
    2. pingpink
    3. Topics
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 16
    • Posts 56
    • Groups 1

    Topics

    • pingpinkP

      About NameError: wrong constant name

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      761 Views
      pingpinkP
      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:in block 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:in const_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'
    • pingpinkP

      How to load all RBS files ?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      3k Views
      A
      thanks for the answer Pingpink. somebody opened a thread about your Plugin in the Plugins sections of Sketchucation just the other day. Can you please post more info there? http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=58694%26amp;p=534451#p534229
    • pingpinkP

      Trial Version

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      300 Views
      TIGT
      But for a low cost script decrypting an rbs to see how it is licensed hardly seems worth the effort. In contrast simply reading a plain rb is much easier to do and more likely to lead to a license breach. Encrypting data/licenses is never going to be 100% 'hacker-proof' - but neither is your front-door lock - but you'll have one and use it anyway - just to stop a casual intruder walking in and stealing your laptop - but a determined thief will know how to open most locks - or just enter another way...
    • pingpinkP

      Colored faces

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      15
      0 Votes
      15 Posts
      387 Views
      pingpinkP
      Thank You again Dan and TIG ! . I understand an idea now.
    • pingpinkP

      Same Name Selection

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      270 Views
      pingpinkP
      Thanks tt_su ! , I'm going to read it !
    • pingpinkP

      Offset + Thickness + Groups

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      308 Views
      pingpinkP
      I can do it now ! def glass_groups model = Sketchup.active_model model.start_operation( "Face Offset" , true) selection = model.selection entities = model.active_entities #entities = model.entities arr = [] faces = [] selection.each{|entity| if entity.class == Sketchup;;Face arr.push entity end } $face_offset = 13 $glass_thickness = 6 prompts = ["Offset Width [mm] ", "Glass Thickness [mm] "] defaults = [$face_offset.to_s,$glass_thickness.to_s ] list = ["",""] input = UI.inputbox prompts, defaults, list, "Offset Face." doffset = input[0].to_f $face_offset = doffset berase = true # 1. Offset Glass + Erase outer faces arr_glass = [] arr.each{|entity| face = face_offset1(entity, doffset.mm, berase) arr_glass.push face } entities.each do |e| faces.push e if e.is_a? Sketchup;;Face end # 2. Glass Thickness + Group's Name distance = input[1].to_f n='Glass unit' faces.each do |e| # e.pushpull distance.mm, true g = entities.add_group e e.pushpull(-distance.mm) g.name=n ############### end model.commit_operation end
    • pingpinkP

      Material Take-Off by layers

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      339 Views
      pingpinkP
      Wow ! I changed the codes and it can analyze the layers. Thank you very very much , Dan !! selection.each { |s| is_group = s.is_a? Sketchup;;Group is_component = s.is_a? Sketchup;;ComponentInstance if s.layer.name == "Aluminium" ----continue---- }
    • pingpinkP

      Store Patterned Data

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      226 Views
      pingpinkP
      Thank You So much,Tig. It works ! This is the idea to revise a model from architect by storing data at the first time. And later use to recheck data for tagging panels , and take the panel out in order that the facade engineer can do the life size panels to do mapping back on sub-dividing panels. The method I do : The subdividing faces are in the "Layer0". The patterns are in the Layer-"Patterns". So , they are not mix together in the same layer. For the shortage time to "delete coplanar edges or patterns" , I have to select edges by degrees and use your code to delete edges because the group edge and original edges are overlap that I have to delete original edges.So , it doesn't affect to bring tagging panels out , and I can recheck the patterned data to do retag panels. For the store patterned data , maybe it comprise of 3 functions : 1.Make edge group 2.Select Coplanar edges by degrees 3.Delete Coplanar edges selection
    • pingpinkP

      Display Schematic Models

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      245 Views
      pingpinkP
      Thanks Dan ! , I never realized about this method. My supervisor wants me to switch schemes for " DESIGN COMPARE " at the same position to open and hide layers , then show all schemes by coding. The layers now are overlapped.If I can't do at the end I will do only Switch One by One. http://www.youtube.com/watch?v=ZffmxlB5dbk&feature=youtu.be
    • pingpinkP

      Load Component and Rotation

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      496 Views
      pingpinkP
      I respect you !!! I'm a big fan of you.
    • pingpinkP

      Face-tag number

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      12
      0 Votes
      12 Posts
      547 Views
      pingpinkP
      Thank you very much,Renderiza ! I've tested the codes , it works very good.I can see the different panel types by coloured faces. I noticed the same face area of the sloped faces and the upright faces , they have different colours.I don't know why it happens for this time , I will look later. I just tried to map components on coloured faces , but I have to select faces and a panel component together to place and copy on the faces. Not sure that I have to do the attribute's name on coloured faces to have the same names as component's names for component mapping.
    • pingpinkP

      Drop-Down List Options

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      18
      0 Votes
      18 Posts
      1k Views
      pingpinkP
      Maybe,the problem is about the component , and face color functions . I did it separately in the external files. My webdialog have to be chosen all options and run by clicking. I'm trying to develop the curtain wall structure modeling .I'm not finished all the codes yet. I use Window , and SU7 to test a program. I changed all the color_value names which you suggest it would cause the conflict about component's color and face's color. It's looked easier in the code. I've attached the files for you If you would like too see. And If you have any suggestions , I love to read for improvement. Thank you for helping and teaching me ,Jolran .I keep doing codes every day.I'm trying !
    • pingpinkP

      How to distinguish face size

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      11
      0 Votes
      11 Posts
      654 Views
      pingpinkP
      Thank you very much ! Actually , I refer "round_to" in a class Fixnum below my main codes. I don't see any error. It's my new knowledge about sprintf("%.2f", 1.23456) [ruby]class Fixnum def abs rx = self if rx < 0 rx = -rx end return rx end def to_meter ufactor = 1.m rx = (self) / ufactor return rx end def round_to(x) (self * 10**x).round.to_f / 10**x end def ceil_to(x) (self * 10**x).ceil.to_f / 10**x end def floor_to(x) (self * 10**x).floor.to_f / 10**x end def rad_to_deg (self / Math;;PI) * 180.0 end def deg_to_rad (self * Math;;PI) / 180.0 end def comma_format s = self.to_s if s.include? ?. pre, post = s.split '.' "#{pre.reverse.gsub( /\d{3}(?=\d)/, '\&,' ).reverse}.#{post}" else s.reverse.gsub( /\d{3}(?=\d)/, '\&,' ).reverse end end end [/ruby][/code]
    • pingpinkP

      Question : Select edges depends on degrees

      Watching Ignoring Scheduled Pinned Locked Moved Newbie Forum sketchup
      3
      0 Votes
      3 Posts
      89 Views
      pingpinkP
      Here is my piktogramm to determine the degrees of edges on selected surfaces. I would like to select only edges following to the condition of structure. Mullion is random degree except 180 degrees , and transom is only 180 degrees. Thank you kindly [image: OppN_CW_programicon.jpg]
    • pingpinkP

      Do a report text file of Spec

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      1
      0 Votes
      1 Posts
      43 Views
      No one has replied
    • pingpinkP

      Question-How to link model components and generate on edges

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      147 Views
      pingpinkP
      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
    • 1 / 1