Problem scripting a 'trim' operation
 1-13  14-33  34-38

Previous
Next
 From:  Dave Morrill (DMORRILL)
3541.34 In reply to 3541.33 
Michael,

> Try something like geometryDatabase.getObjects().unlockSelection(); although
> that will only remove it from top-level objects, you may need to do something
> like put all objects and all their sub-objects also into a object list and then
> call .unlockSelection() on that big object list.

OK, that seemed to do the trick! What I've done for now is to put that code in my script execution framework so that it gets called after every script executes. I did this since it seemed like it might be potentially kind of expensive to do after every trim operation (within a script), especially if it needs to be done on the complete object graph closure. Right now I'm only doing it on the top-level objects at the end of the script. At least now, if I still see weird behavior in the future, I'll know where to look. So thanks for the explanation!

> These various things you're running into are basically side effects from things
> being primarily set up and tested for use with the regular interactive commands.

Sure, understandably so. Another question is though, do you think you might be willing to target the clean-up of some or all of these script-level behavioral issues as a V3 work item? It may not be necessary, since so far the problems I've run into mostly all have viable work-arounds, but it would obviously help simplify a script writers life to remove some of the bumps in the road. Just something to think about.

Thanks again for all your help...

- Dave Morrill
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3541.35 In reply to 3541.34 
Hi Dave, I'm glad that you've got things working now!

> Another question is though, do you think you might
> be willing to target the clean-up of some or all of these
> script-level behavioral issues as a V3 work item?

Certainly! I've actually already added several of the things mentioned here on my todo list.

Also maybe during v3 we can discuss setting up a more procedurally friendly geometry creation API directly within MoI, like a function call based one like you have set up, rather than having to rely on the factory system for simple things like creating lines, etc...

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Dave Morrill (DMORRILL)
3541.36 In reply to 3541.35 
Michael,

> Certainly! I've actually already added several of the things mentioned here on my todo list.

Great!

> Also maybe during v3 we can discuss setting up a more procedurally friendly geometry creation
> API directly within MoI, like a function call based one like you have set up, rather than having
> to rely on the factory system for simple things like creating lines, etc...

Awesome! I'll start making a shopping list ;-) Actually, based on all the scripting work I've done so far, I've been coming up with a number of follow-on projects which, once you have your V3 hat on, might be worth kicking around.

Finally, is the moi.idl file linked to from the scripting wiki page up to date? I've been trying to package up a beta version of some of the scripting extensions I've been working on, and would like to add my MoI API documentation to the package. Since V2 is code complete, I'd like to make sure I've got all the API included, even if it doesn't all have a write up yet (last time I checked, it was about 70% documented).

The funny thing is, I've been using my API documentation a lot while writing scripts, and I've been reading the documentation I wrote previously as if it were all the unvarnished truth. LOL! Well, at least I haven't run across anything I wrote so far that is completely wrong...

- Dave Morrill
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3541.37 In reply to 3541.36 
Hi Dave,

> Finally, is the moi.idl file linked to from the scripting
> wiki page up to date?

No, it wasn't, it was missing a few newer things like the orientation picker object, and some various new options.

I've uploaded the final v2 version and updated the link on scripting wiki page now.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Dave Morrill (DMORRILL)
3541.38 In reply to 3541.37 
> I've uploaded the final v2 version and updated the link on scripting wiki page now.

Thanks!

- Dave Morrill
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-13  14-33  34-38