コード例 #1
0
    def updateSelection(self):

        self.selected = [
            item for item in Eaglepy.selected()
            if isinstance(item, (Eaglepy.ULInstance, Eaglepy.ULElement,
                                 Eaglepy.ULContact))
        ]
        print "UPDATE,", self.selected
コード例 #2
0
ファイル: alignment_tool.py プロジェクト: CatherineH/PyEagle
    def updateSelection(self):

        self.selected = [
            item
            for item in Eaglepy.selected()
            if isinstance(item, (Eaglepy.ULInstance, Eaglepy.ULElement, Eaglepy.ULContact))
        ]
        print("UPDATE,", self.selected)
コード例 #3
0
ファイル: outliner.py プロジェクト: bbenchoff/PyEagle
    def loadSelected(self):

        self.blockSignals(True)

        for selected in Eaglepy.selected():
            for index in range(self.invisibleRootItem().childCount()):
                if self.invisibleRootItem().child(index).data(0,OutlinerTree.itemTypeRole).toPyObject() == self.TYPE_ITEM and \
                    str(self.invisibleRootItem().child(index).text(0)) == selected.name():
                    self.invisibleRootItem().child(index).setSelected(True)
                    item = self.invisibleRootItem().child(index).data(
                        0, OutlinerTree.itemObjectRole).toPyObject()
                    self.currentObjectList.append(item)
        self.blockSignals(False)
コード例 #4
0
ファイル: outliner.py プロジェクト: PierreBizouard/PyEagle
    def loadSelected(self):
    

        self.blockSignals(True)  
        
        for selected in Eaglepy.selected():
            for index in range(self.invisibleRootItem().childCount()):
                if self.invisibleRootItem().child(index).data(0,OutlinerTree.itemTypeRole).toPyObject() == self.TYPE_ITEM and \
                    str(self.invisibleRootItem().child(index).text(0)) == selected.name():
                        self.invisibleRootItem().child(index).setSelected(True)
                        item = self.invisibleRootItem().child(index).data(0,OutlinerTree.itemObjectRole).toPyObject()
                        self.currentObjectList.append(item)
        self.blockSignals(False)    
コード例 #5
0
"""
 (C) Copyright 2013 Rob Watson rmawatson [at] hotmail.com  and others.

 All rights reserved. This program and the accompanying materials
 are made available under the terms of the GNU Lesser General Public License
 (LGPL) version 2.1 which accompanies this distribution, and is available at
 http://www.gnu.org/licenses/lgpl-2.1.html

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 Lesser General Public License for more details.

 Contributors:
     Rob Watson ( rmawatson [at] hotmail )
"""

import Eaglepy
Eaglepy.initialize()
selectedObjects = Eaglepy.selected()
newGroup = Eaglepy.ULGroup()

for objectItem in selectedObjects:
	newGroup.append(objectItem)

Eaglepy.ULContext().groups().append(newGroup)

Eaglepy.status("New Group %s created" % newGroup.name())
Eaglepy.shutdown()
コード例 #6
0
"""
 (C) Copyright 2013 Rob Watson rmawatson [at] hotmail.com  and others.

 All rights reserved. This program and the accompanying materials
 are made available under the terms of the GNU Lesser General Public License
 (LGPL) version 2.1 which accompanies this distribution, and is available at
 http://www.gnu.org/licenses/lgpl-2.1.html

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 Lesser General Public License for more details.

 Contributors:
     Rob Watson ( rmawatson [at] hotmail )
"""

import Eaglepy
Eaglepy.initialize()
selectedObjects = Eaglepy.selected()
newGroup = Eaglepy.ULGroup()

for objectItem in selectedObjects:
    newGroup.append(objectItem)

Eaglepy.ULContext().groups().append(newGroup)

Eaglepy.status("New Group %s created" % newGroup.name())
Eaglepy.shutdown()