TIG wrote:But strangely not with add_arc which returns an ArcCurve ?
Nope, also returns an array.
TIG wrote:It would be unadvisable to change what the API does with these add_ methods
Agree.
New API doc - typos and questionsRe: New API doc - typos and questions
Nope, also returns an array.
Agree. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questions
Perhaps I meant to say, "... add_arc which says it returns an ArcCurve wrongly!" TIG
Re: New API doc - typos and questionsSketchup.write_default
Sketchup.read_default http://code.google.com/intl/nb/apis/ske ... te_default http://code.google.com/intl/nb/apis/ske ... ad_default
Is it really stored under @Last any more? Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questions
No, / Google / Sketchup 7 / etc... TIG
Re: New API doc - typos and questionsGroup.move!
http://code.google.com/intl/nb/apis/ske ... .html#move! .move! moves to an absolute point. Worth noting in the manual. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questions
It doesn't seem to though - we've been testing it in another thread this afternoon and it seem that it moves relative to the transformation-origin NOT the model's ORIGIN - you first have to do a transformation by vector from where it is to the ORIGIN and then off again to the absolute point ? Last edited by TIG on Sun Jan 24, 2010 12:07 pm, edited 1 time in total.
TIG
Sketchup::AttributeDictionaries... which is refering to Sketchup::Entity.attribute_dictionaries http://code.google.com/apis/sketchup/docs/ourdoc/entity.html#attribute_dictionaries
UPDATE (2010JAN23-DanRathbun) PC ver 7.1.6860: REVISED (2010JAN28-DanRathbun): In, SU ver 7.1, IF the Dynamic Components extension is turned OFF, the entity.attribute_dictionaries method will appear to always return a Sketchup::AttributeDictionaries object for the entity, regardless of whether there are any member Sketchup::AttributeDictionary objects. In addition, (if DCs are OFF,) all of the methods of the Sketchup::AttributeDictionary class (except .name,) will no longer work! The entity.attribute_dictionaries method was NOT changed in the previous release, as I thought. The method works as the API says it does, returning "nil if there are none." BUT the Dynamic Components extension must be enabled." http://code.google.com/apis/sketchup/docs/ourdoc/entity.html#attribute_dictionaries There is also no way to determine how many Dictionary objects, there are within an AttributeDictionaries collection (NoMethods: .size, .length, .count, or .empty?) Last edited by Dan Rathbun on Thu Jan 28, 2010 11:00 am, edited 2 times in total.
Re: Sketchup::AttributeDictionariesThere are no methods but several easy combos to do it... You make an array of it and than get its length ? len = AttributeDictionaries.to_a.length or use 'each' ? len = 0;AttributeDictionaries.each{|d|len += 1} Where len is the AttributeDictionaries length ? TIG
Re: New API doc - typos and questionsAttributeDictionaries.to_a.length works.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsComponentInstance.explode
http://code.google.com/apis/sketchup/do ... ml#explode Code example is irrelevant - doesn't show the use of .explode. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsRenderingOptions
http://code.google.com/intl/nb/apis/ske ... tions.html
Bold entries returns nil. The RenderingOptions I get when I iterate the collection is: BackgroundColor BandColor ConstructionColor DepthQueWidth DisplayColorByLayer DisplayDims DisplayFog DisplayInstanceAxes DisplaySketchAxes DisplayText DisplayWatermarks DrawDepthQue DrawGround DrawHidden DrawHorizon DrawLineEnds DrawProfilesOnly DrawSilhouettes DrawUnderground EdgeColorMode EdgeDisplayMode EdgeType ExtendLines FaceBackColor FaceColorMode FaceFrontColor FogColor FogEndDist FogStartDist FogUseBkColor ForegroundColor GroundColor GroundTransparency HideConstructionGeometry HighlightColor HorizonColor InactiveHidden InstanceHidden JitterEdges LineEndWidth LineExtension LockedColor MaterialTransparency ModelTransparency RenderMode SectionActiveColor SectionCutWidth SectionDefaultCutColor SectionInactiveColor ShowViewName SilhouetteWidth SkyColor Texture TransparencySort If the differences is due to changes between SU version I hope the docs will say when they where removed instead of removing them from the manual. Good to know the history. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsProbably picked up before but I just noticed it. So just in case ...
Sketchup::AttributeDictionaries (Revised)My previous post on Sketchup::AttributeDictionaries has been REVISED See the original post: http://forums.sketchucation.com/posting.php?mode=reply&f=180&t=17047#pr218516
Re: New API doc - typos and questionsLayer.page_behavior
http://code.google.com/intl/nb/apis/ske ... e_behavior Only lists two flags:
But Layer.page_behavior= lists other constants. http://code.google.com/intl/nb/apis/ske ... _behavior=
Meaning the constants in the getter should be the same for the setter. LAYER_VISIBLE_BY_DEFAULT: 0x0000 LAYER_USES_DEFAULT_VISIBILITY_ON_NEW_PAGES: 0x0000 LAYER_HIDDEN_BY_DEFAULT: 0x0001 LAYER_IS_VISIBLE_ON_NEW_PAGES: 0x0010 LAYER_IS_HIDDEN_ON_NEW_PAGES: 0x0020 And .page_behavior can be any bitwise combination of these. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsLayer.page_behavior=
http://code.google.com/intl/nb/apis/ske ... _behavior=
When I used that to set the behaviour of a layer on a model I get an error message when I save saying that something was messed up and this is the result of SU fixing it:
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsTools.pop_tool
http://code.google.com/apis/sketchup/do ... l#pop_tool
I only get true or false. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Sketchup.loadSketchup.load
http://code.google.com/apis/sketchup/docs/ourdoc/sketchup.html#load The Sketchup.load method does NOT expose the wrap argument, so we can specify wrap=true for rbs scripts. For some unknown reason, the Google team defeated, or just didn't pass the 2nd argument (wrap) on to the aliased standard load, when they overrode it to handle rbs decrypting. Please fix this! _ Last edited by Dan Rathbun on Tue Feb 23, 2010 7:34 am, edited 4 times in total.
Re: New API doc - typos and questionsWebDialog
http://code.google.com/apis/sketchup/do ... ialog.html
No such thing as UI.getURL. But there is UI.openURL URL not marked up as a clickable link. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
UI::WebDialog maximizeUI::WebDialog
http://code.google.com/apis/sketchup/docs/ourdoc/webdialog.html Limiting the WebDialog Size and setting :resizable=false still allows MSIE window to have a working Maximize button on the captionbar. Clicking it maximizes the dialog (which should not be so.) The 'Size' option in the SystemMenu dropdown is greyed, as it should be, 'Maximize' in the menu is also active. opts = Hash.new # other options set opts[:resizable] = false dlg=UI::WebDialog.new( opts ) dlg.min_height = 100 dlg.max_height = 100 dlg.min_width = 200 dlg.max_width = 200 dlg.set_size(200,100) dlg.show _
UI::WebDialog.write_imageUI::WebDialog.write_image
http://code.google.com/apis/sketchup/docs/ourdoc/webdialog.html#write_image (1) The y coordinate arguments should read 'y' and not 'x'. (2) The coordinates are relative (in the curent implementation,) to the origin of the webdialog's client area, not the screen origin. (3) The top_left_x and top_left_y arguments APPEAR to work (and also default to 0,0 of the client area.) BUG: The bottom_right_x and bottom_right_y arguments SEEM to always get set to top_left_x+clientareawidth and top_right_y+clientareaheight. Changing (specifying) these 4th and 5th arguments SEEMS to have no effect (at least on PC.) (4) So.. although omitted from the API, only the 1st argument is necessary. Simply specifying a file (of the imagetype desired,) produces an image of the WebDialog client area, by default. FUTURE: (a) It is more intuitive, if the 4th and 5th arguments are just width and height offsets from the top_x and top_y (respectively.) (b) I would like a 6th argument origin which would need to default to 'client', with the optional setting 'screen' so we can grab an image of the entire WebDialog (including frame and captionbar, etc.)
UPDATE: Just noticed that there are two undocumented methods that can satisfy the need for current total webdialog size. See my next post... _ Last edited by Dan Rathbun on Mon Mar 08, 2010 10:48 am, edited 2 times in total.
Re: New API doc - typos and questionsView.draw_points
http://code.google.com/apis/sketchup/do ... raw_points Bug in the system: viewtopic.php?f=180&t=26404 Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
UI::WebDialog - undocumented methodsUI::WebDialog
http://code.google.com/apis/sketchup/docs/ourdoc/webdialog.html The following methods need to be documented: last_height last_height= last_width last_width= We are also still wishing to know what the extra Mac parameter for WebDialog.new is for, ie: :mac_only_use_nswindow = boolean What's the difference? ... and what's the default?
API - Release Notes webpage errorAPI - Release Notes webpage error
http://code.google.com/apis/sketchup/docs/releases.html The H2 Heading "What's new in SketchUp 7" is not displayed as a H2 heading. The error is caused by a missing '>' (greaterthan character) on the end of the preceeding <P> element closing tag, which is now: '</P' ie, snippit from current HTML source (line 378): <p class="post"> </p <h2>What's new in SketchUp 7</h2>
Re: New API doc - typos and questionsThe "View" documentation page is almost completely blocked by the user comments section:
EDIT: Fixed. Please, register (free) to access all the attachments on the forums.
Last edited by cjthompson on Thu Mar 11, 2010 2:07 pm, edited 1 time in total.
Re: New API doc - typos and questionswhoa! we can post comments to the API doc now?!? whoppie!
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsYes, you can finally comment directly in the API docs (scroll to the bottom of most of the pages). Hopefully this will help the community share their insights into the API.
We are still working through the list of comments from this thread, so don't feel as if you must copy and paste your (excellent) feedback into the site. But you can if you want to. Cheers,
Re: New API doc - typos and questionsThanks Scott.
Is it better that we post new comments in the actual APi docs now? I expect I'll put down a couple of notes on some of the key issues/gotchas, Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsNew notes should be posted directly to the api site. That way folks visiting the docs can see them immediately and can vote on the most helpful ones. As soon as we close out the issues in this thread, I will remove it from the forums.
Re: New API doc - typos and questionsEeexcellent!
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questions
Don't you dare! This thread was started by ThomThom. (1) It is more than just Errors to fix in the API docs.
@ThomThom: So, of course this means this whole post should be moved to the Discussion thread. (Everything from ThomThom's "whoa!" post on down.)
SketchUcation One-Liner AdvertsArtisan Organic Toolset - a set of powerful organic modeling tools.
Premium Members get 20% discount!
|