Thanks for this, although 5 years later, i'm getting this with Sketchup8:
Error Loading File QueryToolbar.rb
undefined method `GetString' for nil:NilClass
Thanks for this, although 5 years later, i'm getting this with Sketchup8:
Error Loading File QueryToolbar.rb
undefined method `GetString' for nil:NilClass
Sketchup seems to persist image export settings, such as width/height, file format, antialias. Is there a way I can grab these settings?
I'm making a fairly simple script called Thicken, thats basically a wrapper for JPP. My problem is that the VCB is greyed out - even after putting in enabledVCB?
Does anything stand out here (I removed the guts between start_operation and commit_operation for debugging purposes)?
### NOTE; Dev. halted - couldnt get Measurements (VCB/Value Control Box) input working
require 'sketchup.rb'
require 'extensions.rb'
require 'jointpushpull.rb'
thickenExt = SketchupExtension.new "Thicken", "CKD_Thicken.rb"
thickenExt.version = '1.0'
thickenExt.description = 'Uses JPP to thicken the select face/s directly or inside the selected groups'
Sketchup.register_extension thickenExt, true
module Thicken
def initialize()
@thickness = 100.mm
@model = Sketchup.active_model
selectedEntities = model.selection
thickenTool = ThickenTool.new(self)
@model.select_tool thickenTool
model.start_operation "Thicken"
model.commit_operation
end
class ThickenTool
def initialize(caller_class)
@caller = caller_class
end
def activate
Sketchup.set_status_text "Thickness", SB_VCB_LABEL
Sketchup.active_model.active_view.invalidate
end
def deactivate(view)
view.invalidate
end
def onUserText(text, view)
UI.messagebox("what")
end
def enableVCB?
return true
end
end #Class ThickenTool
if( !$thickenLoaded )
$ckdSubMenu.add_item("Thicken") { thicken }
thickenLoaded = true
end
end #Module Thicken
@unknownuser said:
That's how I would go about it as well. JD has done a great job of matching the SU viewport with the Maxwell output so exporting an image with SU linework and overlaying it in photoshop is a pretty straightforward process. It's a nice trick to have under the belt, I've used it once before. But I can't see Maxwell incorporating something like this as their aim is for photorealism and that's more of a NPR trick.
-Brodie
JD?
If this had the option to render edges/lines, i'd buy it. This is very important when using them as textural elements (panel breakup lines, etc).
In Sketchup, if you right click on a material theres an option to see the total area. Can I call this in my script?
Thanks for the tips, although it seems the Style window does not use standard Windows dialog boxes (which I suppose it's why it's one I can't do alt+space m on, which works for the others). Damn!
I changed my dual screen config, and now many of my sketchup floating windows are on a screen that doesn't exist! For most, I can press alt+space and m to move it, but others i can't. Is there some file I can edit or delete to reset this?
Thanks Chris. I'm slowly getting better at the math involved I made a tiling DC today that's central panel does not scale, but the vertical beams do, so it can be whatever size horizontally, but is fixed vertically. Loving these DC's
Well I tell you what would be useful - a script called "Reload&Retain" or something, where it replaces the existing component with the one you pick, BUT it keeps the scale (already keeps rot, pos), as well as all attribute values.
I'd love to know how to do it so you have a set amount of copies. It requires a recursively greater offset per COPY, and I can't work that out.
Thanks Chris! That worked. Would have never had known there was an issue.
I think it's just me misunderstanding SU. Only started using it 2 days ago I have a master file for my component that I work on and then save that component out every now and then, thinking other scenes can just reference that file, but it looks like it doesn't reference it, it just merges it in.
Thanks Chris. I'll check this out tonight.
What seems to be the case is that once you load a DC in and change any components or stretch it, etc., it makes it a new/unique component. I made a few additions to a component a moment ago which theoretically shouldn't affect anything (it didn't take away or alter an existing functions), however if I try to right click->reload that component in my other scene, it tells me i've made changes and am I sure I want to replace it! I say yes, and it resets it to its default scale/attributes.
Is there a way around this?
I'm having a bit of problem using this extremely useful function. I've uploaded an example where there are boxes that copy according to length, and a beam that's length is determined by...the overall length. I've put the CURRENT function in the overall LenX as I've seen done, but it's not working as expected. Am I doing something wrong?
Here's a link to a plugin that does what you want for max. Might give developers ideas on how to do it for SU.