Q: save/restore the selection filters of LSW
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Q: save/restore the selection filters of LSW

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Cadence
Author Message
fogh
Guest





Posted: Sun Nov 06, 2005 9:10 pm    Post subject: Q: save/restore the selection filters of LSW Reply with quote

Hi All,

as a follow up to the selection swap (
http://groups.google.com/group/comp.cad.cadence/tree/browse_frm/thread/4a37ff7f8c144ab3/049417147c38b752?rnum=1&hl=en&_done=%2Fgroup%2Fcomp.cad.cadence%2Fbrowse_frm%2Fthread%2F4a37ff7f8c144ab3%2F696080a641bb6594%3Flnk%3Dst%26q%3Dgegetselset+fogh%26rnum%3D1%26hl%3Den%26#doc_a2c9225b2207fe19
)
I want to have the ability to save and restore the state of the
selection filter.This is necessary because there is no
geSelectFigPointNoFilter()
That seems easy enough for schematics, but I can t find a clean way to
do this with the LSW. The layer can probably be dealt with
leSetLayerAttributes() and techGetLeLswLayers() , but I can t find a
good way to deal with the objects. Especially if I want to make code
that would work properly in all versions since 5.0.33

Is there a layout SKILL guru who can help ?

TIA.
--
Frederic

Back to top
S. Badel
Guest





Posted: Mon Nov 07, 2005 5:10 pm    Post subject: Re: Q: save/restore the selection filters of LSW Reply with quote

Quote:
I want to have the ability to save and restore the state of the
selection filter.This is necessary because there is no
geSelectFigPointNoFilter()

By "selection filter", do you mean which layers are selectable, as and wether
instances and pins are selectable - well actually what's in the lsw?

If yes, then that shouldn't be very hard to do with the following functions :

- leIsInstSelectable
- leSetInstSelectable
- leIsPinSelectable
- leSetPinSelectable
- leIsLayerSelectable
- leSetLayerSelectable
- leSetAllLayerSelectable
- leGetValidLayerList

If not, could you elaborate?

cheers,

Stéphane
Back to top
fogh
Guest





Posted: Mon Nov 07, 2005 9:10 pm    Post subject: Re: Q: save/restore the selection filters of LSW Reply with quote

S. Badel wrote:
Quote:
I want to have the ability to save and restore the state of the
selection filter.This is necessary because there is no
geSelectFigPointNoFilter()


By "selection filter", do you mean which layers are selectable, as and
wether
instances and pins are selectable - well actually what's in the lsw?
yes. I mean that. I want to know wether they are selectable, visible,

valid(for layers). I would rather, if I give another go at this
secundary buffer utility, that it is robust against any manipulation of
the layers and objects, and that it works well with mosaics too (damn
mosaics!).

Quote:

If yes, then that shouldn't be very hard to do with the following
functions :

- leIsInstSelectable
- leSetInstSelectable
- leIsPinSelectable
- leSetPinSelectable
- leIsLayerSelectable
- leSetLayerSelectable
- leSetAllLayerSelectable
- leGetValidLayerList
I found these in the manual, but I am still missing the object

visibility, and the selectability for marker, row, prBdy, snapBdy
I also noticed that the edit->save / edit->load does not restore these
(so using a temporary file and the corresponding ^leHi.* is no
workaround ).

Back to top
Trevor Bowen
Guest





Posted: Mon Nov 07, 2005 9:10 pm    Post subject: Re: Q: save/restore the selection filters of LSW Reply with quote

Argh... Should read:

The only one that I could *not* change *by* manipulating the
selectability/visibility is "instance". I could change visibility, but
not the selectability by manipulating the "instance" "drawing" LPP.

Trevor Bowen wrote:
Quote:
I believe these objects map to simple LPP's:

instance -> "instance" "drawing"
pin -> all layers with purpose "pin"
marker -> "marker" "warning"/"error"
row -> "row" "drawing"
prBdy -> "prBoundary" "boundary" (but not "drawing", weird!)
snapBdy -> "snap" "boundary"

You can get/set the status by manipulating these LPP's directly in the LSW.

The only one that I could change my manipulating the
selectability/visiablity is "instance". I could change visability, but
not the selectability by manipulating the "instance" "drawing" LPP.

Coupling this with:

- leIsLayerSelectable
- leSetLayerSelectable

You should be in good shape!

*NOTE*: There may be an OA layer or even a special dfII tech prop
beyond what I could see in my simple dfII database, but this worked for me.

fogh wrote:

S. Badel wrote:

I want to have the ability to save and restore the state of the
selection filter.This is necessary because there is no
geSelectFigPointNoFilter()




By "selection filter", do you mean which layers are selectable, as
and wether
instances and pins are selectable - well actually what's in the lsw?


yes. I mean that. I want to know wether they are selectable, visible,
valid(for layers). I would rather, if I give another go at this
secundary buffer utility, that it is robust against any manipulation
of the layers and objects, and that it works well with mosaics too
(damn mosaics!).


If yes, then that shouldn't be very hard to do with the following
functions :

- leIsInstSelectable
- leSetInstSelectable
- leIsPinSelectable
- leSetPinSelectable
- leIsLayerSelectable
- leSetLayerSelectable
- leSetAllLayerSelectable
- leGetValidLayerList


I found these in the manual, but I am still missing the object
visibility, and the selectability for marker, row, prBdy, snapBdy
I also noticed that the edit->save / edit->load does not restore these
(so using a temporary file and the corresponding ^leHi.* is no
workaround ).
Back to top
Trevor Bowen
Guest





Posted: Mon Nov 07, 2005 9:10 pm    Post subject: Re: Q: save/restore the selection filters of LSW Reply with quote

I believe these objects map to simple LPP's:

instance -> "instance" "drawing"
pin -> all layers with purpose "pin"
marker -> "marker" "warning"/"error"
row -> "row" "drawing"
prBdy -> "prBoundary" "boundary" (but not "drawing", weird!)
snapBdy -> "snap" "boundary"

You can get/set the status by manipulating these LPP's directly in the LSW.

The only one that I could change my manipulating the
selectability/visiablity is "instance". I could change visability, but
not the selectability by manipulating the "instance" "drawing" LPP.

Coupling this with:

- leIsLayerSelectable
- leSetLayerSelectable

You should be in good shape!

*NOTE*: There may be an OA layer or even a special dfII tech prop
beyond what I could see in my simple dfII database, but this worked for me.

fogh wrote:
Quote:
S. Badel wrote:

I want to have the ability to save and restore the state of the
selection filter.This is necessary because there is no
geSelectFigPointNoFilter()



By "selection filter", do you mean which layers are selectable, as and
wether
instances and pins are selectable - well actually what's in the lsw?

yes. I mean that. I want to know wether they are selectable, visible,
valid(for layers). I would rather, if I give another go at this
secundary buffer utility, that it is robust against any manipulation of
the layers and objects, and that it works well with mosaics too (damn
mosaics!).


If yes, then that shouldn't be very hard to do with the following
functions :

- leIsInstSelectable
- leSetInstSelectable
- leIsPinSelectable
- leSetPinSelectable
- leIsLayerSelectable
- leSetLayerSelectable
- leSetAllLayerSelectable
- leGetValidLayerList

I found these in the manual, but I am still missing the object
visibility, and the selectability for marker, row, prBdy, snapBdy
I also noticed that the edit->save / edit->load does not restore these
(so using a temporary file and the corresponding ^leHi.* is no
workaround ).
Back to top
fogh
Guest





Posted: Fri Nov 11, 2005 1:10 am    Post subject: Re: Q: save/restore the selection filters of LSW Reply with quote

Trevor,

never mind. I got your point.
With your explanations it all seems more simple than at first sight. I
ll give it a go soon.

Trevor Bowen wrote:
Quote:
Argh... Should read:

The only one that I could *not* change *by* manipulating the
selectability/visibility is "instance". I could change visibility, but
not the selectability by manipulating the "instance" "drawing" LPP.

Trevor Bowen wrote:

I believe these objects map to simple LPP's:

instance -> "instance" "drawing"
pin -> all layers with purpose "pin"
marker -> "marker" "warning"/"error"
row -> "row" "drawing"
prBdy -> "prBoundary" "boundary" (but not "drawing", weird!)
snapBdy -> "snap" "boundary"

You can get/set the status by manipulating these LPP's directly in the
LSW.

The only one that I could change my manipulating the
selectability/visiablity is "instance". I could change visability,
but not the selectability by manipulating the "instance" "drawing" LPP.

Coupling this with:

- leIsLayerSelectable
- leSetLayerSelectable

You should be in good shape!

*NOTE*: There may be an OA layer or even a special dfII tech prop
beyond what I could see in my simple dfII database, but this worked
for me.

fogh wrote:

S. Badel wrote:

I want to have the ability to save and restore the state of the
selection filter.This is necessary because there is no
geSelectFigPointNoFilter()





By "selection filter", do you mean which layers are selectable, as
and wether
instances and pins are selectable - well actually what's in the lsw?



yes. I mean that. I want to know wether they are selectable, visible,
valid(for layers). I would rather, if I give another go at this
secundary buffer utility, that it is robust against any manipulation
of the layers and objects, and that it works well with mosaics too
(damn mosaics!).


If yes, then that shouldn't be very hard to do with the following
functions :

- leIsInstSelectable
- leSetInstSelectable
- leIsPinSelectable
- leSetPinSelectable
- leIsLayerSelectable
- leSetLayerSelectable
- leSetAllLayerSelectable
- leGetValidLayerList



I found these in the manual, but I am still missing the object
visibility, and the selectability for marker, row, prBdy, snapBdy
I also noticed that the edit->save / edit->load does not restore
these (so using a temporary file and the corresponding ^leHi.* is no
workaround ).
Back to top
fogh
Guest





Posted: Sun Nov 13, 2005 1:10 am    Post subject: Re: Q: save/restore the selection filters of LSW Reply with quote

Trevor,

the first draft does not work too well. Visibility toggles fine, but
selectability does not. Would you have an idea ?

Here is what I tried (sorry, bad indentation again):

procedure( CmLeGetLSWState(@optional (cv nil) )
let( (tf tl layerstate lswstate)
cv || ( cv=geGetEditCellView() )
tf=techGetTechFile(cv)
tl=tf->layers
layerstate=foreach(mapcar l tl list(l->valid l->selectable l->visible))
lswstate=cons(leIsInstSelectable(tf) layerstate)
);let
);proc

procedure( CmLeSetLSWState(l_lswstate @optional (cv nil) )
let( (tf tl layerstate)
cv || ( cv=geGetEditCellView() )
tf=techGetTechFile(cv)
tl=tf->layers
layerstate=cdr(l_lswstate)
foreach( (l s) tl layerstate
;info("%L\t\%L\t%L\n" l->name l->purpose s)
; l->valid=car(s)
; l->visible=caddr(s)
; l->selectable=cadr(s)
; leSetLayerSelectable(list(l->name l->purpose) cadr(s) )
;info("%L\t\%L\t%L\n" l->name l->purpose list(l->valid l->selectable
l->visible))
leSetLayerAttributes(tf cons(list(l->name l->purpose) s) )
)
leSetInstSelectable(car(l_lswstate))
);let
);proc


fogh wrote:
Quote:
Trevor,

never mind. I got your point.
With your explanations it all seems more simple than at first sight. I
ll give it a go soon.

Trevor Bowen wrote:

Argh... Should read:

The only one that I could *not* change *by* manipulating the
selectability/visibility is "instance". I could change visibility,
but not the selectability by manipulating the "instance" "drawing" LPP.

Trevor Bowen wrote:

I believe these objects map to simple LPP's:

instance -> "instance" "drawing"
pin -> all layers with purpose "pin"
marker -> "marker" "warning"/"error"
row -> "row" "drawing"
prBdy -> "prBoundary" "boundary" (but not "drawing", weird!)
snapBdy -> "snap" "boundary"

You can get/set the status by manipulating these LPP's directly in
the LSW.

The only one that I could change my manipulating the
selectability/visiablity is "instance". I could change visability,
but not the selectability by manipulating the "instance" "drawing" LPP.

Coupling this with:

- leIsLayerSelectable
- leSetLayerSelectable

You should be in good shape!

*NOTE*: There may be an OA layer or even a special dfII tech prop
beyond what I could see in my simple dfII database, but this worked
for me.

fogh wrote:

S. Badel wrote:

I want to have the ability to save and restore the state of the
selection filter.This is necessary because there is no
geSelectFigPointNoFilter()






By "selection filter", do you mean which layers are selectable, as
and wether
instances and pins are selectable - well actually what's in the lsw?




yes. I mean that. I want to know wether they are selectable,
visible, valid(for layers). I would rather, if I give another go at
this secundary buffer utility, that it is robust against any
manipulation of the layers and objects, and that it works well with
mosaics too (damn mosaics!).


If yes, then that shouldn't be very hard to do with the following
functions :

- leIsInstSelectable
- leSetInstSelectable
- leIsPinSelectable
- leSetPinSelectable
- leIsLayerSelectable
- leSetLayerSelectable
- leSetAllLayerSelectable
- leGetValidLayerList




I found these in the manual, but I am still missing the object
visibility, and the selectability for marker, row, prBdy, snapBdy
I also noticed that the edit->save / edit->load does not restore
these (so using a temporary file and the corresponding ^leHi.* is no
workaround ).
Back to top
fogh
Guest





Posted: Sun Nov 13, 2005 1:10 am    Post subject: Re: Q: save/restore the selection filters of LSW Reply with quote

All,

I had more sucess with the second go, but i would like some review anyway:

procedure( CmLeGetLSWState(@optional (cv nil) )
let( (tf tl layerstate lswstate)
cv || ( cv=geGetEditCellView() )
tf=techGetTechFile(cv)
tl=tf->layers
layerstate=foreach(mapcar l tl copy(list(
l->valid
leIsLayerSelectable(list(l->name l->purpose))||(not(l->valid) &&
l->selectable)
l->visible)) )
lswstate=cons(leIsInstSelectable(tf) layerstate)
);let
);proc

procedure( CmLeSetLSWState(l_lswstate @optional (cv nil) )
let( (tf tl layerstate)
cv || ( cv=geGetEditCellView() )
tf=techGetTechFile(cv)
tl=tf->layers
layerstate=cdr(l_lswstate)
leSetInstSelectable(car(l_lswstate))
foreach( (l s) tl layerstate
l->valid=car(s)
l->selectable=cadr(s) l->selectable=cadr(s)
leSetLayerSelectable(list(l->name l->purpose) cadr(s) )
l->visible=caddr(s)

l->visible))
)
);let
);proc



fogh wrote:
Quote:
Trevor,

the first draft does not work too well. Visibility toggles fine, but
selectability does not. Would you have an idea ?

Here is what I tried (sorry, bad indentation again):

procedure( CmLeGetLSWState(@optional (cv nil) )
let( (tf tl layerstate lswstate)
cv || ( cv=geGetEditCellView() )
tf=techGetTechFile(cv)
tl=tf->layers
layerstate=foreach(mapcar l tl list(l->valid l->selectable l->visible))
lswstate=cons(leIsInstSelectable(tf) layerstate)
);let
);proc

procedure( CmLeSetLSWState(l_lswstate @optional (cv nil) )
let( (tf tl layerstate)
cv || ( cv=geGetEditCellView() )
tf=techGetTechFile(cv)
tl=tf->layers
layerstate=cdr(l_lswstate)
foreach( (l s) tl layerstate
;info("%L\t\%L\t%L\n" l->name l->purpose s)
; l->valid=car(s)
; l->visible=caddr(s)
; l->selectable=cadr(s)
; leSetLayerSelectable(list(l->name l->purpose) cadr(s) )
;info("%L\t\%L\t%L\n" l->name l->purpose list(l->valid l->selectable
l->visible))
leSetLayerAttributes(tf cons(list(l->name l->purpose) s) )
)
leSetInstSelectable(car(l_lswstate))
);let
);proc


fogh wrote:

Trevor,

never mind. I got your point.
With your explanations it all seems more simple than at first sight.
I ll give it a go soon.

Trevor Bowen wrote:

Argh... Should read:

The only one that I could *not* change *by* manipulating the
selectability/visibility is "instance". I could change visibility,
but not the selectability by manipulating the "instance" "drawing" LPP.

Trevor Bowen wrote:

I believe these objects map to simple LPP's:

instance -> "instance" "drawing"
pin -> all layers with purpose "pin"
marker -> "marker" "warning"/"error"
row -> "row" "drawing"
prBdy -> "prBoundary" "boundary" (but not "drawing", weird!)
snapBdy -> "snap" "boundary"

You can get/set the status by manipulating these LPP's directly in
the LSW.

The only one that I could change my manipulating the
selectability/visiablity is "instance". I could change visability,
but not the selectability by manipulating the "instance" "drawing" LPP.

Coupling this with:

- leIsLayerSelectable
- leSetLayerSelectable

You should be in good shape!

*NOTE*: There may be an OA layer or even a special dfII tech prop
beyond what I could see in my simple dfII database, but this worked
for me.

fogh wrote:

S. Badel wrote:

I want to have the ability to save and restore the state of the
selection filter.This is necessary because there is no
geSelectFigPointNoFilter()







By "selection filter", do you mean which layers are selectable, as
and wether
instances and pins are selectable - well actually what's in the lsw?





yes. I mean that. I want to know wether they are selectable,
visible, valid(for layers). I would rather, if I give another go at
this secundary buffer utility, that it is robust against any
manipulation of the layers and objects, and that it works well with
mosaics too (damn mosaics!).


If yes, then that shouldn't be very hard to do with the following
functions :

- leIsInstSelectable
- leSetInstSelectable
- leIsPinSelectable
- leSetPinSelectable
- leIsLayerSelectable
- leSetLayerSelectable
- leSetAllLayerSelectable
- leGetValidLayerList





I found these in the manual, but I am still missing the object
visibility, and the selectability for marker, row, prBdy, snapBdy
I also noticed that the edit->save / edit->load does not restore
these (so using a temporary file and the corresponding ^leHi.* is
no workaround ).
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Cadence All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB