sketchucation logo sketchucation
    • Login
    1. Home
    2. ericschimel
    3. Posts
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download
    E
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 50
    • Posts 294
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Sketchup Mac opens Photoshop when placing a model

      This was a fresh install of Photoshop.

      To temporarily alleviate the problem, I just deleted Photoshop for the moment. I will be putting it back on soon and will let you know if I get the same results. I have had this happen with other programs and file formats before, and doing the standard Mac fill association switch worked fine....

      posted in SketchUp Discussions
      E
      ericschimel
    • Sketchup Mac opens Photoshop when placing a model

      So I have this weird problem, whenever I "place" a geolocated model in Sketchup on my Mac, it opens the KMZ file in Photoshop.....

      I found a KMZ file on my hard drive, and realized that is was associated with Photoshop for some reason, I changed it to be associated with Google earth, and also selected "Change all" so that all KMZ files should be associated with Google Earth. Still though, whenever I place a model for some reason, it won't open Google Earth, it instead opens Photoshop. The KMZ files even have the Google Earth logo too....

      Has anyone run into this? I am doing a presentation at AIA tomorrow, and I'd really like for this to work properly.

      posted in SketchUp Discussions sketchup
      E
      ericschimel
    • RE: Animation from YouTube

      Anyone know how they animated the components falling into place with scene transitions like that?

      posted in SketchUp Discussions
      E
      ericschimel
    • RE: Mass material importer

      Is there a way that you can set the default texture size? I see that when you import them, they all come in at 10" x 10".....

      Other then that, sweet plugin!

      posted in Developers' Forum
      E
      ericschimel
    • RE: Sketchup welcome screen

      Ahh! There it is! I knew it wasn't far! Thanks so much!

      posted in SketchUp Discussions
      E
      ericschimel
    • Sketchup welcome screen

      Does anyone know how to get the Sketchup welcome screen back once you've turned it off?

      posted in SketchUp Discussions sketchup
      E
      ericschimel
    • RE: Invitation to the SketchUcation collection

      Nice model! I really like it.

      Did you use LayOut, or the CutList plugin to figure out how to build it?

      posted in Woodworking
      E
      ericschimel
    • RE: Download to Sketchup button

      Thanks for the update. I haven't had a chance to try to implement this yet, hopefully I will in the next few days. I will certainly let you know how it all turns out!

      posted in Developers' Forum
      E
      ericschimel
    • RE: Download to Sketchup button

      Ok, so here's what I've got (I think I've made some progress)

      I followed Thomthoms suggestions, and of course they didn't work. (I am sure I am 100% at fault!) HOWEVER... I checked with the ruby console, and I found an error for "invalid model url"

      ruby console.PNG

      I had the model in the same directory as the web page, and I assumed that is where it would be looked for. However, it also occured to me that it might need to go in the same folder as the plugin, so I tried that, and still no dice...

      The good news here (I think) is that I've got Sketchup and my web dialog talking to each other!

      Here is the link I am using to try to send my model into Sketchup (the one that generates the "invalid model URL error)

      <a href="#" onclick="window.location='skp:download_model@test.skp'">Download Model</a>

      To Dan... Yes, I did copy the file locations right out of Firefox. Those URL's are going to acutlaly be on my webserver. They do work, why, I am not sure, but they do.

      Also, about the module situation, after doing some more reading, I think I am starting to understand the benefit of making this into a module. I am not going to go there just yet because I just need to get this thing working, then I can worry about making it "neater".

      As far as putting the plugin in a special directory, I want to do that, I am just trying to tackle one thing at a time. Great suggestions, and I WILL be following them, I am just trying not to let my head explode over what is probably a simple task for you Ruby pros! πŸ˜„

      Thanks for all the help so far guys, I am really learning a lot!

      posted in Developers' Forum
      E
      ericschimel
    • RE: Download to Sketchup button

      I am on both the PC and the Mac. I am mostly working on a PC though.

      So did I miss something obvious on my current situation, or will I find the answers in the users guide? πŸ˜„

      posted in Developers' Forum
      E
      ericschimel
    • RE: Download to Sketchup button

      Ok, so if I understand this correctly, the "add action callback" command needs to know what window the commands are coming from. So, when you create a web window, you name it. Naturally, the "add action callback" would need to have the same name as your window. That makes sense to me, if I am reading everything correctly.

      So, I went ahead and switched the name that Jim gave me as a filler name, and put my dialog name in, and it still doesn't work. In the Ruby console I am getting a "uninitialized constant" error.

      As far as wrapping stuff up in modules, I think I understand the concept of that, but at this point, I think its way over my head... πŸ˜„

      Here is the entire ruby script I am using:

      #-----------------------------------------------------------------------------
      
      require 'sketchup.rb'
      
      #-----------------------------------------------------------------------------
      
      def create_dialog
      
      	dlg = UI;;WebDialog.new("SketchThisNET", true, "", 1200, 800, 150, 150, true);
      	dlg.set_url "file;///C;/Users/Eric/Documents/SketchThis/TEST2.html"
      	dlg.show
      
      
      	
      	SketchThisNET.add_action_callback("download_model") { |dlg, args|
        Sketchup.active_model.definitions.load_from_url(args)
      }
      
      end
      
      if( not file_loaded?("SketchThisNET.rb") )
          add_separator_to_menu("Plugin")
          UI.menu("Plugin").add_item("SketchThis.NET") { create_dialog }
      
        toolbar = UI;;Toolbar.new "www.SketchThis.NET"
           # This toolbar icon simply displays Hello World on the screen
           cmd = UI;;Command.new("www.SketchThis.NET") { 
             create_dialog
           }
           cmd.small_icon = "SketchThisSmallIcon.png"
           cmd.large_icon = "SketchThisLargeIcon.png"
           cmd.tooltip = "www.SketchThis.NET"
           cmd.status_bar_text = "www.SketchThis.NET Toolbar"
           cmd.menu_text = "SketchThis"
           toolbar = toolbar.add_item cmd
           toolbar.show
      
      end
      
      #-----------------------------------------------------------------------------
      file_loaded("SketchThisNET.rb")
      
      
      posted in Developers' Forum
      E
      ericschimel
    • RE: Download to Sketchup button

      Thanks Jim for correcting it... Now I can load the page with no script errors.

      I am having an issue with the Ruby code I think... I haven't seen any Ruby code with an "@" symbol in front of it, so I tried it with, and without, and I still not getting any results.

      I checked with the Ruby console, and there seems to be an error with the "add action callback" line. Should it matter where in the Ruby I place the code? and what other code is in there? Currently, all my Ruby does is open a web dialog first, then the "Add action callback line is in there" and then there is the code to place an icon in its own toolbar, and in the "plugins" menu. That's it.

      See the screenshot for the Ruby console...

      Once I see this working one time, I should be able to get things moving on my own....


      ruby console.PNG

      posted in Developers' Forum
      E
      ericschimel
    • RE: Download to Sketchup button

      Ok Jim, I used your code exactly as you posted it. The method I used in my webpage was your "href" method. The only thing I changed was switching "modelname.skp" for "test.skp" which is a Sketchup model of the same name that I have in the same directory as the web page.

      I am getting a script error whenever I load the web page in Sketchup. The error, near as I can tell, points to the ":" in the command. Why? I have no clue... Perhaps there needs to be some additional code in the HTML of my web page? Right now the only code in it at all is the "href" command.

      See attached file for the screenshot of the error.

      By the way, I added the code exactly as you posted it into my Ruby code. Sketchup seems to like it so far, I suspect that the script error I am getting has nothing to do with the Ruby code, as I don't think the Ruby has even been used yet, because of the error in the web page.

      @jim said:

      For that to work, your user needs to be viewing your web page in a WebDialog opened from SketchUp.

      The hyperlink does not href the model, but rather it might look something like the following, although it could be any element not just an anchor.

      
      > <a href="#" onclick="skp;download_model@modelname.skp">Download Model</a>
      > or
      > <span onclick="skp;download_model@model_url>Download This</span>
      > 
      

      which calls the WebDialog callback named "download_model" and passes in the filename.

      # Then in the Ruby plug-in;
      > @dialog.add_action_callback("download_model") { |dlg, args|
      >   Sketchup.active_model.definitions.load_from_url(args)
      > }
      

      In a nutshell, the html code sends the model name or url to the Ruby plug-in, which then uses load_from_url to download the model.


      Script error.PNG

      posted in Developers' Forum
      E
      ericschimel
    • RE: Download to Sketchup button

      Aha! That was the thing I was looking for! Now that I know how to send commands down to Sketchup through the web dialog, I can start experimenting!

      I'll let you know how it works for me...

      Thanks so much!

      posted in Developers' Forum
      E
      ericschimel
    • RE: Download to Sketchup button

      I understand that, I did find those commands in the Ruby docs, my question is this:

      Those commands, from what I understand, need to be generated when the user clicks on a model. How do I make that happen? A standard hyperlink won't do it....

      posted in Developers' Forum
      E
      ericschimel
    • RE: Download to Sketchup button

      I think this is what I am after...

      I am good with the Ruby code, where I am confused is how to implement this on the server side. If I have a hyperlink to a file, what has to happen for Sketchup to insert, rather then download the model?

      posted in Developers' Forum
      E
      ericschimel
    • RE: Download to Sketchup button

      Well, I think I may hire someone to do this for me, I am just trying to get a "Proof of concept" going so I can test out its functionality, and then pass it on to the real programmers to make perfect.

      I have found plenty of examples of the web dialog being implemented, thats how I was able to pull that off. I haven't been able to find any examples of where someone has opened a web dialog and sent a model into Sketchup from a website.

      You saying that the example is buggy makes me not feel so warm a fuzzy about learning off of that example, I'd rather see one that works.

      posted in Developers' Forum
      E
      ericschimel
    • RE: Download to Sketchup button

      Thanks so much for the prompt reply!

      Here's the deal though, I am REALLY Ruby illiterate...

      Basically, I was barely able to create a plugin that opened a website in Sketchup, and I was only able to do this by MUCH trial and error...

      So that Ruby code sample you gave me seems to be exactly what I need, according to the description. Where do I place the code? In my plugin that opens the web window in Sketchup, or is there some of that code that needs to go in my actual website where the components are?

      posted in Developers' Forum
      E
      ericschimel
    • Download to Sketchup button

      So I have created a website that I am going to host some components on. I have a Ruby plugin that I wrote that opens my website in Sketchup. What I am having trouble figuring out is how to get Sketchup to have the models inserted into the model rather then downloaded to the computer.

      I want my "download to model" button work just like the 3D Warehouse button works...

      I have seen this done before, but try as I might, I can seem to nail this one, does anyone out there have any suggestions?

      posted in Developers' Forum
      E
      ericschimel
    • RE: Changing a DC axis

      Thanks for trying Jim... Just out of curiosity, how were you able to export any attributes from the DC?

      posted in Dynamic Components
      E
      ericschimel
    • 1
    • 2
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 11 / 15