sketchucation logo sketchucation
    • Login
    1. Home
    2. LarsG
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    L
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 3
    • Groups 1

    LarsG

    @LarsG

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

    LarsG Unfollow Follow
    registered-users

    Latest posts made by LarsG

    • RE: Start/commit_operation

      First
      I guess like the poster I don't really have a point with this rant except to warn others who
      is as clueless as I about both neccessary and good practices working with Ruby Sketchup.
      As usual when I read your posts, thank you, I find a gold nugget, it is sometimes just hard
      to to know that you need it.

      Second
      I see that it is good and and I agree it makes sence that it works that way..
      My irritation points are that:

      As far as I know my add_3d_text didn't output any error beside returning a nil
      value, a return value you seldom use.

      There was (AFAIK) no type of exception raised either.

      The documentation is as usual very short and doesn't mention it actually undoing any work,
      the work might as well have been undone by a call to abort_operation not automatically.

      posted in Developers' Forum
      L
      LarsG
    • RE: Start/commit_operation

      whoops, writing that out made me think of something...

      Learn To Think... solved my problem, quite stupid mistake that was well hidden.

      I believe that if an operation goes wrong after start_operation then other objects will be deleted,
      possible all objects created since start_operation.

      In my case it was add_3d_face("") which made it so, haven't tested with other functions.

      posted in Developers' Forum
      L
      LarsG
    • RE: Start/commit_operation

      Start/commit operation has today cost me many hours.

      I'm developing a plugin writting in c++ that calls some sketchup functions and one them
      is to print some 3d text on a group. That worked fine before I put a start / commit operation
      around it then I suddenly couldn't use objects only a command later.
      They would be referencing nilClass.

      I haven't been able to figure out what it changes, especiallly since disabling the ruby garbage collector didn't
      change anything.

      ( and sorry if my terminology is confusing, ruby is new to me, and Sketchup API (especially when going c++ -> ruby -> sketchup c++ ) is a mystery )

      posted in Developers' Forum
      L
      LarsG