Thanks for your help everyone! TIG's advice did the trick.
Also thomthom, thank you for pointing out your editable 3d text plugin. I've wished it existed for a long time. Awesome work!
Thanks for your help everyone! TIG's advice did the trick.
Also thomthom, thank you for pointing out your editable 3d text plugin. I've wished it existed for a long time. Awesome work!
I'm struggling a bit with this simple action.
I've got a tool that generates and places 3d text based on user input. However each time they use the tool I need to check if the 3d text already exists. If it does, it needs to be deleted and replaced.
I've dug up Entities.erase_entities from the API, but I have not been able to implement it successfully where I avoid undefined local variable (trying to detect the 3d text on first run) and reference to deleted Group (attempting to delete the 3d text a second time) errors.
Here is the relevant snippet:
commentgroup = entities.add_group
commentgroupents = commentgroup.entities
addusercomment = commentgroupents.add_3d_text(usercomment, TextAlignLeft, "Arial", true, false, fontheight, 0.0, 0.5, true, 5.0)
Thank you.
Thanks again guys for steering me in the right direction. I think I've got it sorted out.
Thanks guys. I hadn't thought of simply using SU's built-in shortcuts.
Are shortcuts saved to a file I can distribute with each installation? My users aren't very comfortable with computers so it would be best if each person had the exact same setup. Overwriting user settings won't be an issue thankfully.
Also thank you for pointing out issues with laptop keyboards. That's definitely going to be a problem I'll have to work around.
Hi,
I'm creating a simplified toolbar for my users and I'd like for them to be able to press + or - to adjust the scale of an object regardless of their selected tool.
I've figured out the code to scale using +/-, but I can't figure out how to make it apply to all tools (custom and default SU) like a global script. I know this is generally a no-no, but all of my users use SU in a very specific way.
Is there an easy way to do this?
Thank you.
Your points are very fair and make sense, but man was it frustrating to figure out the hard way.
You finally got it through to me. Sorry for being so slow. It's extremely confusing having SketchUp calculate differently from other calculator defaults, not to mention it says nothing about calculating in degrees within the Component Attributes window. It's good to know nothing is actually broken with SketchUp though. I built my equation outside SketchUp so now I'll rebuild it inside.
Thanks a bunch for this conversation.
Thanks a lot for your help and patience.
If SketchUp returns cos() in degrees, shouldn't cos(pi()) = -57.2957795?
EDIT:
These are the calculators I'm comparing SketchUp against.
@unknownuser said:
1080cos(100(pi/180))
-- pi/180 = .017
-- .017 * 100 = 1.7
-- cos 1.7 = .999
-- 1080 * .999 = 1079basically, it's going to work from the innermost parenthesis outward…
5* (20*(10/5))
would be 10 divided by 5 first (2)
then 2 * 20 (40)
then 5 * 40 =200(not going to the appropriate decimals etc in that example)
-- cos 1.7 = .999
How did you calculate this? I believe it's -.0128844. EDIT: and cos(pi) = -1
EDIT2: I'm mostly trying to prove that SketchUp is wrong and I'm wondering why.
Are you sure SketchUp is correct? Maybe I'm misunderstanding how it works.
SketchUp calculates:
1080cos(0(pi()/180)) = 1080 (correct)
1080cos(180(pi()/180)) = 1078.377 (incorrect?)
Shouldn't 180 degrees mean it's -1080? 180 degrees is opposite of 0 on the circle. Also I used the RADIANS() function because it looks cleaner. Thanks for your help.