sketchucation logo sketchucation
    • Login
    1. Home
    2. mocathe1st
    3. Posts
    βŒ› Sale Ending | 30% Off Profile Builder 4 ends 30th September
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 16
    • Posts 30
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: WebDialog on Mac (call to Google SU engineers)

      Hi All,

      I've currently run into the synchronisation problem described above. The JavaScript file I have currently written is fairly simple, and only passes messages from Flash via JavaScript to Ruby. I've got a single function to take care of this. However, when I send a quick succession of messages from Flash to Ruby via JS most of the commands get lost on the Mac, this works fine on the PC.

      I was just wondering if anyone found a solution to the synchronisation problem, is there a way to create a JavaScript buffer or a way of synchronising the messages?

      Best Regards,
      Malcolm Murray

      posted in Developers' Forum
      M
      mocathe1st
    • RE: SketchUp and EnergyPlus

      Just to let you know that Demeter has now be renamed LiveEnergy Modeller and a new version is available for download on our website at: http://greenspacelive.com. LiveEnergy Modeller is currently available on an Alpha testing basis unti 31st October 2009. We would value any feedback suggestions etc.

      I've also put more information in a SketchUcation post here: http://forums.sketchucation.com/viewtopic.php?f=80&t=21789.

      Thanks,
      Malcolm Murray

      posted in Developers' Forum
      M
      mocathe1st
    • Greenspace, developers of Demeter release new products

      http://www.greenspacelive.com/images/logo_homepage.jpg

      Greenspace, the developers of the Demeter SketchUp plugin and the LiveEPC SBEM front-end, are making available a new, integrated, suite of energy analysis tools as a free (time-limited) alpha release.

      The Greenspace Live suite is made up of 4 tools:

      • The latest version of the Demeter SketchUp plugin, now called LiveEnergy Modeller. LiveEnergy Modeller is an energy analysis plugin for Google SketchUp. Based on the gbXML standard for designing resource efficient buildings and specifying associated equipment, LiveEnergy Modeller enables the building designer to decorate 3D SketchUp building models with gbXML surfaces and openings, to identify and label gbXML spaces, and to import and export gbXML models. As a result of using LiveEnergy Modeller, Google SketchUp becomes an intelligent solution for low carbon building design. Models can be quickly exported to LiveEnergy EPC for energy analysis and certification.

      • The latest version of LiveEPC, now called LiveEnergy EPC. This is a front-end to the SBEM energy simulation program (extensively used in the UK) and can produce (non-DSM) energy analysis as well as checking UK building regulations and producing an Energy Performance Certificate. LiveEnergy EPC is not a modeller -- it imports gbXML from LiveEnergy Modeller (or any other gbXML source). Whilst it is a desktop application, the energy analysis actually takes place on a server (which is where all files reside also). This means your files and reports are visible anywhere in the world where there is internet access.

      • To better leverage this web-based approach, we've created a powerful browser-based viewing application called LiveEnergy Dashboard which incorporates sophisticated graphing tools.

      • Finally, we'd like to introduce LiveEnergy Workspace, a web-based project management framework and filestore that lets you make the most of the collaboration the web is supposed to make easy.

      All our tools are available for use on our website at: http://greenspacelive.com. We also provide access to training videos, documentation etc as well a support forum. All the tools are currently released on an Alpha basis (although some are more mature than others) and are available for free until the end of the Alpha testing period (31st October 2009). We would be grateful for any feedback, bug reports etc in order to help us improve the reliability and user experience of the tools.

      Thanks,
      Malcolm Murray

      posted in Extensions & Applications Discussions extensions
      M
      mocathe1st
    • RE: Registering a Scrambled Extension

      OK, I've kind of sorted this out by not encrypting the file being referenced by SketchupExtension and encrypting the rest. This seems to work for now, but it would be quite nice if you could register encrypted ruby files as extensions.

      posted in Developers' Forum
      M
      mocathe1st
    • RE: Registering a Scrambled Extension

      Just wondering if anyone has any solutions for this? I've tried everything I can think of to get the scrambled extension to load up. When I try it with the non scrambled version everything works fine, but when I link SketchupExtension.new to an rbs file it comes back with a message that the file cannot be found even when I know for certain it is there. I've even used Sketchup.find_support_file to get the path to the rbs file I need to load the plugin with but I still get the same error message.

      Has anyone else had any problems with this kind of thing?

      Any help would be most appreciated.

      Thanks,
      Malcolm Murray

      posted in Developers' Forum
      M
      mocathe1st
    • Registering a Scrambled Extension

      Hello,

      I was just wondering if anyone could tell me if its possible to register a scrambled extension (where the ruby files are in .rbs format) using the SketchUp extension registering api.

      e.g. from the docs, the following line registers an extension:

      # Create an entry in the Extension list that loads a script called
           # stairTools.rb.
           require 'sketchup.rb'
           require 'extensions.rb'
      
           stair_extension = SketchupExtension.new "Stair Tools", "utils/stairTools.rb"
           stair_extension.version = '1.0'
           stair_extension.description = "Tools to draw stairs automatically."
           Sketchup.register_extension stair_extension, true
      

      but what if the ruby file was stairTools.rbs? I've tried just substitiuting the file extension for the .rbs one in my plugin but I just get an error message about the file not being found.

      Does anyone have any ideas as to why this would be?

      Thanks,
      Malcolm Murray

      posted in Developers' Forum
      M
      mocathe1st
    • RE: Getting the Current Date with SketchUp Ruby API

      OK, figured this out and have it working.

      Just have to add the date.rb, Date folder and rational.rb files from the Ruby Core files to the plugin and it works perfectly. πŸ˜„

      posted in Developers' Forum
      M
      mocathe1st
    • Getting the Current Date with SketchUp Ruby API

      Hi everyone,

      I was just wondering if anyone could help me find a way of getting the current date using the SketchUp API. It appears that the SketchUp API does not have access to the Ruby Date class. I was just wondering if anyone has come up against this issue before and found a workaround?

      I suppose one way would be to import the Ruby standard date class into my plugin, but I've no idea what other dependencies are on that....

      Any help would be most appreciated.

      Best Regards,
      Malcolm Murray

      posted in Developers' Forum
      M
      mocathe1st
    • RE: Weird bug with WebDialog and Flash

      Hi there,

      This problems appears on a PC, I haven't tried it on a Mac yet as there are a couple of Flash security issues that I need to resolve before it loads on the Mac. I'll try it with an external flash site that doesn't need local access though and post my results here.

      Basic HTML TextAreas do seem to work fine so that I can enter new lines etc without any issue. It only seems to be with flash text entry and only from within SketchUp. Opening the same page in the normal IE has no problems at all.

      I've just tried selecting different tools etc and the problem still seem to be there regardless of the tool selected.

      Its really puzzling as to why the enter key would be disabled (the esc key also doesn't appear to work based on the KeyListener test I did) while the other keys work fine.

      Thanks for your help, any ideas as to what is causing this would be most welcome.

      Thanks,
      Malcolm

      posted in Developers' Forum
      M
      mocathe1st
    • Weird bug with WebDialog and Flash

      Hello there.

      I've just come across a really strange problem with the SketchUp webdialog and flash applications. I can link a web dialog to my flash based gui html page and at first it appears to work correctly. The problem, however, is that the return key does not seem to work within the webdialog at all. All other keyboard keys work fine but the return key is completely ignored (as if its blocked). I've tried various tests including putting Keylisteners into my flex app to see what keys are recognised (only the esc and return keys aren't). I've also tried creating a new script that only opens a web dialog with a link to an external flash page and I get the same problem with this (so it doesn't appear to be a problem with my code). The external test page I used was: http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html

      I don't know if anyone has come across this before, but it is a real problem for me as I have built the gui for my plugin using Adobe Flex and I have some textareas that I need the users to fill out (which require multi-line input) so not having the return key is a real problem. Using normal HTML textareas seems to work fine and loading up Flex pages in normal Internet Explorer also seems to work fine.

      Any help would be most appreciated.

      Best Regards,
      Malcolm Murray

      posted in Developers' Forum
      M
      mocathe1st
    • SQLite in SketchUp Ruby

      Hi all,

      I was just wondering if anyone has successfully managed to get SQLite or any other embedded database working with the SketchUp Ruby API.

      I've been trying to get the sqlite-ruby module (http://sqlite-ruby.rubyforge.org/) working in SketchUp but keep getting driver errors after modifying the require paths and was wondering if anyone else has tried this or has any pointers on how to proceed.

      Thanks,
      Malcolm Murray

      posted in Developers' Forum
      M
      mocathe1st
    • Loading a Material from SKM

      Hi all,

      I was just wondering if anyone knows how to load up a Material from it's SKM file.

      I've got a whole bunch of materials (saved as .SKM files) that contain attributes and which I need to be able to load up and assign to faces programmatically. It is no problem to do this manually, but I can't find a way of doing this via the Ruby API. 😞

      Any ideas???

      Thanks very much,
      Malcolm Murray

      posted in Developers' Forum
      M
      mocathe1st
    • RE: WebDialog Javascript callback Maximum message size

      Hi,

      Thanks for your replies. I don't know what I'd do without this forum for help... πŸ˜„

      I'll try creating a hidden div to hold the XML and use the get_element_value to retrieve it from SketchUp. I'll let you know if it works for me.

      Thanks again,

      Malcolm

      posted in Developers' Forum
      M
      mocathe1st
    • WebDialog Javascript callback Maximum message size

      Hi all,

      I just found out today that the maximum message size for passing a Javascript callback to SketchUp is 2083 characters as this is the max url size in Internet Explorer (I think its more like 80000 in Safari, so this is limited to the Windows version of Safari). This is extremely annoying as I'm currently working on a project where I have to pass XML data between SketchUp and my plugin and this is causing all manner of problems. 😒

      I was just wondering if anyone knows of any other methods of passing data to a to SketchUp via the WebDialog other than passing messages into the URL?

      posted in Developers' Forum
      M
      mocathe1st
    • Comonent Attributes Not being saved

      Hi all.

      I've just run into a bit of a problem with component attributes. What I'm trying to do is to be able to create a component, then assign some attributes to it via a simple editor I created and then save the component to a specific subfolder of the Sketchup/Components folder for use in later models.

      When I assign the attributes as follows:

      e.definition.set_attribute('dict', 'test', 'test')
      

      they are available within the component in the initial model, but when I load up the component into a new model from the component browser, the attributes are no longer available. If I save the attributes to the Sketchup.Active_Model as such:

      Sketchup.active_model.set_attribute('dict', 'test', 'test')
      

      then they are available when I load up the component from the component browser.

      I want to be able to assign attributes to specific components and then save them to the component browser, so saving to the Active_Model isn't really suitable. I might be missing something here, but I've been trying to figure this out for a while now.

      Any help would be most welcome,
      Malcolm Murray

      posted in Developers' Forum
      M
      mocathe1st
    • RE: Entity.set_attribute infinite loop

      Hi Thanks for that solution, I've tried it and it works a treat.

      Its a bit hackish but it works so it'll do.

      Thanks again.

      posted in Developers' Forum
      M
      mocathe1st
    • Entity.set_attribute infinite loop

      Hi,

      Just wondering if anyone can help me with a problem I've been struggling with all day 😞

      I'm trying to assign a unique id attribute to each face entity that is created when the plugin is running. I've set up a model observer so that every time that onElementAdded is fired it checks whether the new entity is a face and if it is it does the following:

      entity.set_attribute('test', 'id', id)
      

      The problem is that when this happens I start to get an infinite loop and eventually sketchup crashes. I've whittled the cause of this down to the attribute being set, this seems to create the face over and over again.

      The following is the code I've got to do this:

      
      def onElementAdded(entities, entity)
      	puts entity.typename
      	if entity.kind_of? Sketchup;;Face
      		if entity.get_attribute('test', 'id') == nil
      			puts "setting attribute"
      			entity.set_attribute('test', 'id', 'blah')		
      		end
      	 end
      end
      
      

      In the above code I've just put 'blah' as the id to make sure that it wasn't the unique id that was causing the problem. BTW, the unique id is just a timestamp.

      Any help or suggestions would be greatly appreciated.

      posted in Developers' Forum
      M
      mocathe1st
    • RE: [Plugin] Demeter - Energy Analysis in Sketchup

      Hi Rick,

      Thanks for your feedback and other help. I agree, the menu would be neater within a submenu especially when using many different plugins.

      We've just released an updated beta version of Demeter that does this. The overall folder structure has been improved and the plugin should now be compatible with your Organizer plugin. It is also now compatible with the Mac OS X version of Sketchup and has had various other improvements.

      The new version can be downloaded at:http://greenspaceresearch.com/demeter.html

      Thanks,
      Malcolm Murray

      posted in Plugins
      M
      mocathe1st
    • [Plugin] Demeter - Energy Analysis in Sketchup

      Hi everyone,

      Just wanted to let you all know about our (Greenspace Research's) Sketchup plugin, Demeter.

      Google have just written a blog post about this in the Official Sketchup blog here: http://sketchupdate.blogspot.com/2007/11/demeter-new-energy-analysis-tool-for.html#links

      The Demeter plugin allows for energy analysis to be carried out on Sketchup building models in a matter of minutes. The plugin allows for the import and export of the GBXML file format, the addition of building attributes such as wall types etc and allows for Skethcup models to be sent directly to the Green Building Studio for instant energy analysis. All this in a snazzy 3D user interface.

      We have just released a beta version of the plugin which is available at our website. For more information on the plugin, and to join the beta programme, please visit: http://greenspaceresearch.com/

      All thoughts, error reports, ideas, welcolme.

      posted in Plugins
      M
      mocathe1st
    • Using default sketchup materials with Ruby API

      I think I'm missing something in the docs, but can anyone tell me how to assign default sketchup materials to faces? The docs seem to be for Sketchup 4 and talks about .jpg files.

      I tried the following code but it just changes the material to black:
      materials = Sketchup.active_model.materials

      
      m = materials.add "opening"
      m.texture="c;\\Program Files\\@Last Software\\Google SketchUp 6\\Materials\\Translucent\\Translucent_Glass_Sky_Reflection.skm"
      face.material = m
      
      

      Any help would be great.

      Thanks.

      posted in Developers' Forum
      M
      mocathe1st
    • 1 / 1