sketchucation logo sketchucation
    • Login
    1. Home
    2. Lance_Uppercut
    ⚠️ Attention | Having issues with Sketchucation Tools 5? Report Here
    L
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 4
    • Groups 1

    Lance_Uppercut

    @Lance_Uppercut

    10
    Reputation
    1
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Lance_Uppercut Unfollow Follow
    registered-users

    Latest posts made by Lance_Uppercut

    • How does Sketchup assign persistent ids?

      I was wondering if anyone knows what rule or process Sketchup follows to assign persistent ids to the various entities that support them? From inspecting a new file with a couple of new objects as well as components from the sampler set, they are all 5 digit integers and seem to be sequential where basic geometry is concerned, but ids are definitely skipped for a new group (#find_entity_by_persistent_id comes up null for the skipped integers).

      What I'm trying to do is write a scene graph that can keep track of relationships between a set of custom object instances, and normal Sketchup objects, (groups and component instances). Working entirely with integers is both efficient and easy to serialize for storage between sessions, but I need to avoid collisions between my object IDs and the Sketchup persistent IDs. I would prefer not to maintain a separate set of IDs for custom objects - they all need to be part of one pool.

      Thanks!

      posted in Developers' Forum
      L
      Lance_Uppercut
    • Return values from ruby system calls

      This should be really simple, but for some reason I cannot get any return values from simple Ruby system calls from within Sketchup...for example:

      
      puts `echo test`      # nil result
      x = `echo test`       # nil result
      puts x                # nil result
      x.empty?              # true
      
      system('echo test')   # true
      

      Strangely the system('echo test') returns true, indicating that the process was successfully run...does anyone have any ideas? I'd like to avoid having to use txt or csv files as intermediaries.

      Thanks,
      Sebastian

      posted in Developers' Forum
      L
      Lance_Uppercut
    • RE: Passing instructions to active tools

      I was afraid I'd have to do that...the base tools are not actually that simple, lots of state changes to keep track of. Anyway I'll start with LineTool.rb and go from there. Thanks Thom!

      posted in Developers' Forum
      L
      Lance_Uppercut
    • Passing instructions to active tools

      **Hi,

      I'm planning out a plugin that would allow the basic Sketchup drawing tools to be used with absolute coordinates. The idea is to be able to START a line (or other shape), at a given point in 3D space, which would be entered via the VCB. The functionality would be close to the drawing tools in AutoCAD. (It's a request from a architect friend of mine who has some specific use in mind).

      Obviously Sketchup's tools don't respond to the VCB until you place the first point, and I know that it's not possible to extend the native Sketchup tools either. Is there some way of sending input points to an active tool via Ruby script instead? My idea was to set a ToolsObserver on the active model's tools object, collect some coordinates in the VCB, and as soon as a tool is activated, the observer callback function sends the previously entered input point to the tool as a starting point.

      So far I haven't seen any way of passing instructions to a tool, is this even possible?

      Thanks,
      Sebastian.**

      posted in Developers' Forum
      L
      Lance_Uppercut