Specific Grouping Use Case
All  1-7  8-14

Previous
Next
 From:  Philip (DUESENTRIEB)
7464.8 In reply to 7464.7 
Hi Scott,

Thanks for that script. I just tried it, but I get the following error message:



What´s wrong?

It´s the first script I try to install. Just took the script text, put it into text editor, converted to plain text, and changed the fileformat to .js . Then I put it into the commands folder and assigned a shortcut to it.

Another very useful tutorial regarding groups I found is by Max Smirnov: https://www.youtube.com/watch?v=HGiZgl2Q6g8

Asked him for the script via PM. Or does anybody know where to find it in this forum?

-Philip
Attachments:

  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:  Frenchy Pilou (PILOU)
7464.9 In reply to 7464.8 
Max Smirnov can send something to him I suppose! :)
---
Pilou
Is beautiful that please without concept!
My Gallery
  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
7464.10 In reply to 7464.8 
Hi Philip,

re:
> What´s wrong?

Can you please post your _sameName.js file here as a file attachment so I can take a look at it?

- 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:  Philip (DUESENTRIEB)
7464.11 In reply to 7464.10 
Hi Michael,

there you are. Attached the script.

-Philip
Attachments:

  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:  scott (SSHWARTS)
7464.12 In reply to 7464.11 
Philip:
I think you're missing the ending brace.

var objects = moi.geometryDatabase.getSelectedObjects();
if (objects.length > 0) {
var name = objects.item(0).name;
moi.geometryDatabase.selectNamed(name);
}

Scott
  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
7464.13 In reply to 7464.11 
Hi Philip - your script is invalid JavaScript code because it's missing the closing bracket for the if statement.

You've got an open bracket here shown in bold red:

var objects = moi.geometryDatabase.getSelectedObjects();
if (objects.length > 0) {
var name = objects.item(0).name;
moi.geometryDatabase.selectNamed(name);


So to go along with that open bracket you need a close bracket to complete the if statement, like in the attached file.

Once you add the closing bracket your script should then work as you wanted it to.

EDIT: scott beat me to it! :)

- Michael
Attachments:

  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:  Philip (DUESENTRIEB)
7464.14 In reply to 7464.13 
Thanks Scott and Michael!

Stupid small mistake. Works now.
  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-7  8-14