Scripting the Trim command -- programmatically select objects to keep or remove?
All  1-4  5-9

Previous
Next
 From:  mike (MVERHULST)
11415.5 In reply to 11415.4 
can you test it in v4? i wonder if i am doing something wrong? see the image? i cant click on the circle, but i can click ui buttons and/or either of the 2 line segments

EDITED: 29 May 2024 by MVERHULST

Image Attachments:
Size: 109.9 KB, Downloaded: 42 times, Dimensions: 1039x776px
  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:  pressure (PEER)
11415.6 In reply to 11415.5 
Hi Mike,

I can click on the circle fine in v4 and in v5.

Is the code that you posted the entirety of your script, or is there other code too? Is there anything going on in the companion .htm file?

It sounds like selection lock is getting set on the circle. That's the typical reason for not being able to click on something.

- Peer
  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:  mike (MVERHULST)
11415.7 In reply to 11415.6 
interesting

that is the whole script i dont have a html file

i am running it with this command

"C:\Program Files\MoI 4.0\MoI.exe" C:\Users\Administrator\Desktop\trimtest.js
  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:  mike (MVERHULST)
11415.8 In reply to 11415.7 
excellent,

thanks for your help :)

i needed to add

var objects = gd.getObjects();
objects.unlockSelection();
  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:  Michael Gibson
11415.9 In reply to 11415.8 
Hi Mike, clearing selection lock is something that normally happens when a command ends.

When you run a startup script it's not using the "command" mechanism and so you'll have to do some things manually like that.

- 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
 

Reply to All Reply to All

 

 
 
Show messages: All  1-4  5-9