Flying Logic Forum
November 21, 2017, 07:30:47 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: • Flying Logic 3.0.9 has been released!
Click here to visit the Flying Logic home page.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Modify selection using Python script  (Read 96 times)
chudo19
Newbie
*
Posts: 2


View Profile
« on: October 18, 2017, 11:13:35 AM »

I did not find method that allows setting selection to a list of specified elements
Does it exist? 
Logged
Joe Pearce
CTO, Sciral
Administrator
Full Member
*****
Posts: 141



View Profile
« Reply #1 on: October 18, 2017, 12:12:10 PM »

I did not find method that allows setting selection to a list of specified elements
Does it exist? 

Assign a list to the selection field of an instance of the Document object. That field is both read and write.

document.selection = [ entity1, edge1, entity2 ]
Logged
chudo19
Newbie
*
Posts: 2


View Profile
« Reply #2 on: October 18, 2017, 12:26:03 PM »

No effect:

sel = []
for ge in document.all:
    if ge.isEntity:
        print ge.title
   sel.append(ge)

document.selection = sel


Logged
Joe Pearce
CTO, Sciral
Administrator
Full Member
*****
Posts: 141



View Profile
« Reply #3 on: November 07, 2017, 08:22:08 PM »

That's weird. We'll look into this.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!