sketchucation logo sketchucation
    • Login
    1. Home
    2. Pout
    3. Topics
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    P
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 57
    • Posts 259
    • Groups 1

    Topics

    • P

      Component definition list from Ruby vs SU window

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      393 Views
      P
      great, thank you both for the information!
    • P

      Looping all entities

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      341 Views
      P
      Excellent information. Thank you ThomThom, much appreciated!
    • P

      Update entity by webdialog/excel

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      315 Views
      P
      a little bit more information: Standard DC definition attributes (dynamic_attributes): Retrieve with (for the selected instance): xx=Sketchup.active_model.selection[0].definition.attribute_dictionaries['dynamic_attributes'] xx.each{|key,value| puts key.to_s+'-'+value.to_s} Returns (app. depending on user set attributes of the selected instance-in this case LenX and LenY are 'user cannot see' and material is 'user can see'): _formatversion-1.0 _has_movetool_behaviors-0.0 _hasbehaviors-1.0 _lastmodified-2012-02-21 10:13 _lengthunits-CENTIMETERS _lenx_access-NONE _lenx_formlabel-LenX _lenx_label-LenX _lenx_units-DEFAULT _leny_access-NONE _leny_formlabel-LenY _leny_label-LenY _leny_units-DEFAULT _material_access-VIEW _material_formlabel-Material _material_label-Material _material_units-STRING _name-Huis1 lenx-393.700787401575 leny-393.700787401575 material- When changing LenX and LenY to 'user can see': _formatversion-1.0 _has_movetool_behaviors-0.0 _hasbehaviors-1.0 _lastmodified-2012-02-21 10:15 _lengthunits-CENTIMETERS _lenx_access-VIEW _lenx_formlabel-LenX _lenx_label-LenX _lenx_units-DEFAULT _leny_access-VIEW _leny_formlabel-LenY _leny_label-LenY _leny_units-DEFAULT _material_access-VIEW _material_formlabel-Material _material_label-Material _material_units-STRING _name-Huis1 lenx-393.700787401575 leny-393.700787401575 material- Standard instance attributes (dynamic_attributes): xx=Sketchup.active_model.selection[0].attribute_dictionaries['dynamic_attributes'] xx.each{|key,value| puts key.to_s+'-'+value.to_s} _has_movetool_behaviors-0.0 _hasbehaviors-1.0 lenx-393.700787401575 leny-393.700787401575 Now if you add an attribute on definition level eg. LenX this is accessible as lenx for both the comp. definition as the instance. Important: to be able to access that value on instance level with _lenx_formula (eg. to change the value) the attribute must be set to at least 'users can see this attribute' . Otherwise it cannot be changed through ruby. If I get out more information, I'll post it here.
    • P

      Moving object in steps

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      175 Views
      P
      i got it, will post solution later
    • P

      Simplify this element

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      8
      0 Votes
      8 Posts
      346 Views
      P
      I don't mind the 'harsh' comments at all! Like this i know the problem is at the side of AutoCAD and not at the side of Sketchup!! Thx all! Btw Thomthom, that cleanup works excellent!
    • P

      Webdialog stops working after action_calback

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      193 Views
      P
      here it goes (it's still a dev) 1.webdialog 1 opened with: $xdinfowindowke=UI;;WebDialog.new("xDInfo", true,"xDInfo",290,300,0,0,true) fn= $html_folder+"/xD_infowindow.html" $xdinfowindowke.set_file fn $xdinfowindowke.set_size(290,300) $xdinfowindowke.show {} 2.populated from ruby with //activated each time another SU entity is clicked command = "_sendinfo('#{$sendobjectid}','#{$sendlist}')" $xdinfowindowke.execute_script(command) 3.javascript in webdialog 1 function _sendinfo(theobjectid, theinfo){ //fill in the rows attr=theinfo.split("|||"); for (i=0;i<attr.length;i++){ splitted=attr[i].split("$$$") var oRow = oBody.insertRow(-1); //insert the first cell var oCell = oRow.insertCell(-1); oCell.className="attrnames"; oCell.innerHTML = splitted[0]+";"; //insert the second cell var oCell = oRow.insertCell(-1); oCell.className="attrnames"; //if it is the objectname, make clickable if (i==0){ oCell.innerHTML = "<a href='javascript&#058;_show4Dobject("+theobjectid+")'>"+splitted[1]+"</a>"; } else { //if the string contains ^ it means it is a link. split up if(splitted[1].indexOf("^") != -1){ waw=splitted[1].split("^"); oCell.innerHTML='<a href="'+waw[1]+'" target=_blank">'+waw[0]+'</a>'; } else { oCell.innerHTML = splitted[1]; } } } //add the end attach a last row var oRow = oBody.insertRow(-1); var oCell = oRow.insertCell(-1); oCell.height="1px"; oCell.colSpan="2"; oCell.className="split"; } This makes some html links in webdialog1 with this code: <a href='javascript&#058;_show4Dobject([i]id[/i])'>"[i]name[/i]"</a> handled by this code in webdialog1: function _show4Dobject(objectid){ query = 'skp;_show4dobjects@'+objectid; window.location.href = query; } Now back in SU this is handled by: $xdinfowindowke.add_action_callback("_show4dobjects") {|$xdinfowindowke,p| #check if the xdwindow is open--> [b]this is another window[/b] if $xdwindow visible=$xdwindow.visible? if visible==true command = "_xdhighlight('#{p}')" $xdwindow.execute_script(command) else UI.messagebox('Open the 4D Objects window to highlight') end else UI.messagebox('Open the 4D Objects window to highlight') end } Basically this all goes fine. When the html link is clicked in webdialog1, something happens in webdialog2 But from there on, when i click another SU entity the content of webdialog1 is not updated anymore. Hope the information here helps. Thx!
    • P

      Observer question

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      359 Views
      P
      suberb, and this on a sunday!!! Thx tig and dan, much appreciated!
    • P

      Plugins menu not shown or in different language

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      171 Views
      thomthomT
      Yes - one always use the English names regardless of what locale the user might have. The Plugins menu is only mission when no plugins has added any menus to it.
    • P

      Multi-language plugin

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      509 Views
      TIGT
      Sketchup tried it... BUT many of us prefer our own methods...
    • P

      Determine OS bit version with ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      4k Views
      Dan RathbunD
      @unknownuser said: as I dont have 64bit Windows to test it up, take in account this as well - "The %ProgramFiles% itself depends on whether the process requesting the environment variable is itself 32-bit or 64-bit" %ProgramFiles% = ENV['ProgramFiles'] But I told him to use %ProgramFiles(x86)% (which is ENV['ProgramFiles(x86)'],) and should not be present on 32bit systems. On a 64bit system, running a 32bit process (in this case 32bit Sketchup, running 32bit Ruby as a subprocess,) a copy of the enviroment is created for the process. Both the vars ENV['ProgramFiles'] and ENV['ProgramFiles(x86)'] should contain a pathstring that points at the same 32bit localized "program files" directory.
    • P

      Ruby created images not ok?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      252 Views
      P
      Hey Tig, Thx for the answer. Why i am not using teh animation exporter is because it skips page observers. Since changing from one page to another invokes a function in my model i cannot use it. That's why i'm looking for an alternative to create movies. You think it's possible that adding the compression an transparent factor solves the issue? Cause i have also tried it with images generated by Export-->2D graphic and that had the same error. Thx!
    • P

      Slice plugin

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      7
      0 Votes
      7 Posts
      601 Views
      GaieusG
      Edited that post (see details there)
    • P

      Edit the dxf/dwg importer

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      248 Views
      TIGT
      @pout said: Simple question: Is the dwg/dxf importer accessible? Thx You use Sketchup.active_model.import(path_to_CAD_file.dwg, boolean) The importer knows from the file suffix if it's a dwg or dxf. The boolean controls if a report is displayed - true/false... You can't readily control the 'options' as the ones currently set in the manual Import options for dwg/dxf will be used for the API import... [You can 'script' PC code to open the import dialog and change options but it's a bit clunky - see an old version of my 'Xref Manager' script set...]
    • P

      Alternative for webdialogs

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      414 Views
      J
      @l.frisken said: would fxruby or qtruby be other options? There would be little difference between these and wxsu. Maybe we should ask the OP about their goals and expectation?
    • P

      Close webdialogs on File-New/Open

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      14
      0 Votes
      14 Posts
      615 Views
      Dan RathbunD
      Agreed. I logged several Feature Requests for MDI support (new methods) in the API, including a Models collection.
    • P

      [Plugin] 4D Virtual Builder Ultimate - beta

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      4
      0 Votes
      4 Posts
      14k Views
      jgbrock1J
      Is 4D virtual builder still supported? The website shows last update 2014. I reached out with no return email
    • P

      Section Plane

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      14
      0 Votes
      14 Posts
      721 Views
      P
      ThomThom, thx for the answers! With auto-creation I mean this: The creation through ruby of a section plane in each of the 20 groups that are in the model.
    • P

      Transformation scale

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      294 Views
      P
      ok i've found it here: http://forums.sketchucation.com/viewtopic.php?f=180&t=24947&p=213942 use .transform! instead of .transformation .transform adds the specified transformation to the already existing one .transformation replaces the current transformation (like in: will put the object back to 0,0,0)
    • P

      [Plugin] DefaultScenes

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      19
      0 Votes
      19 Posts
      13k Views
      CadFatherC
      Yes Pout.. that is it!
    • P

      SU8 - new api

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      16
      0 Votes
      16 Posts
      1k Views
      thomthomT
      The release notes is all I've found... which even appear to be incorrect when it comes to the selection observers.
    • 1 / 1