Skill command for Copy

Guest
Does anybody know a skill command that will allow you to copy from one
cell view into another cell view without a form popping up. I was
going to use the geCopySeleSet(), but it appears that you have to use
it to copy into the same window.
 
shumb...@irf.com wrote:
Does anybody know a skill command that will allow you to copy from
one
cell view into another cell view without a form popping up. I was
going to use the geCopySeleSet(), but it appears that you have to use
it to copy into the same window.
dbCopyFig should work for you
dstFig = dbCopyFig(srcFig, dstCellView, list(0:0 "R90" 2.0))
 
shumble1@irf.com wrote:
Thank you for the reply. That definitely works better than what I was
trying to do, but it still doesn't help me with my overall problem.

What I am trying to do is setup copy and paste keys that will take
everything that you have selected and copy it to a hidden cell view.
when you hit the paste key, it will go into that hidden cell view,
select everything and allow the user to copy it back into their layout.

I would prefer just to use the buffer on the computer to copy the data
into, but I don't know how to do that so I was going to get around it
by using a cellview. If you have any ideas, I would greatly appreciate
your comments.
How about -

Copy:

CopySet = geGetSelectedSet()

Paste:

geDeselectAll()
foreach( o CopySet
geSelectObject( o ))
geCopySelectedSet()




----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
You may want to dig into the conceopt of selectedSets ...
Instead of copying, you are selecting.

Then you could work with a number of selectedSets.

(note this makes the complimentary paste function into a cut&paste job)

- G



<shumble1@irf.com> wrote in message
news:1112028208.937330.71800@f14g2000cwb.googlegroups.com...
Thank you for the reply. That definitely works better than what I was
trying to do, but it still doesn't help me with my overall problem.

What I am trying to do is setup copy and paste keys that will take
everything that you have selected and copy it to a hidden cell view.
when you hit the paste key, it will go into that hidden cell view,
select everything and allow the user to copy it back into their layout.

I would prefer just to use the buffer on the computer to copy the data
into, but I don't know how to do that so I was going to get around it
by using a cellview. If you have any ideas, I would greatly appreciate
your comments.
 
Thank you for the reply. That definitely works better than what I was
trying to do, but it still doesn't help me with my overall problem.

What I am trying to do is setup copy and paste keys that will take
everything that you have selected and copy it to a hidden cell view.
when you hit the paste key, it will go into that hidden cell view,
select everything and allow the user to copy it back into their layout.

I would prefer just to use the buffer on the computer to copy the data
into, but I don't know how to do that so I was going to get around it
by using a cellview. If you have any ideas, I would greatly appreciate
your comments.
 
shumble1@irf.com wrote:
Does anybody know a skill command that will allow you to copy from
one
cell view into another cell view without a form popping up. I was
going to use the geCopySeleSet(), but it appears that you have to use
it to copy into the same window.
Here is my solution to that problem:

This code copies whatever is selected in the edit window and saves it
in a junk cell and then the "paste" function adds that cell into the
edit window and flattens the hierarchy one level and puts you in move
mode with the pasted items selected. Try it.

procedure( CopyToClipBoard( )
prog( ( tmp cv_id libName clipboard_id figs d_inst fig dX dY listbBox
)

; get important info
cv_id = geGetEditCellView()
libName = cv_id~>libName
figs = nil
listX = nil
listY = nil
dX = 0
dY = 0

if( geGetSelSetCount(cv_id)==0 then
return(nil)
else
figs = geGetSelSet()
)

d_inst=dbOpenCellViewByType(
libName;{ gt_lib | nil }
"ClipBoardBuffer";t_cellName
"layout";lt_viewName
"maskLayout" "w";[ t_viewTypeName [ t_mode [ d_contextCellView ] ] ]

) ; => d_cellView / nil

listbBox = figs~>bBox

dX=caaar(listbBox)
dY=cadaar(listbBox)

foreach( tmp listbBox
if( dX>caar(tmp) then
dX=caar(tmp)
)
if( dY>cadar(tmp) then
dY=cadar(tmp)
)
)

foreach( fig figs
dbCopyFig( fig d_inst list(-dX:-dY "R0" 1.0))
);foreach

);prog
);procedure

procedure( CutToClipBoard( )
prog( ( tmp cv_id libName clipboard_id figs d_inst fig dX dY listbBox
)

; get important info
cv_id = geGetEditCellView()
libName = cv_id~>libName
figs = nil
listX = nil
listY = nil
dX = 0
dY = 0

if( geGetSelSetCount(cv_id)==0 then
return(nil)
else
figs = geGetSelSet()
)

d_inst=dbOpenCellViewByType(
libName;{ gt_lib | nil }
"ClipBoardBuffer";t_cellName
"layout";lt_viewName
"maskLayout" "w";[ t_viewTypeName [ t_mode [ d_contextCellView ] ] ]

) ; => d_cellView / nil

listbBox = figs~>bBox

dX=caaar(listbBox)
dY=cadaar(listbBox)

foreach( tmp listbBox
if( dX>caar(tmp) then
dX=caar(tmp)
)
if( dY>cadar(tmp) then
dY=cadar(tmp)
)
)

foreach( fig figs
dbMoveFig( fig d_inst list(-dX:-dY "R0" 1.0))
);foreach

);prog
);procedure


procedure( PasteClipBoard( )
let( ( cv_id libName db_id ( refPoint enterPoint( ) ) )

; get important info
cv_id = geGetEditCellView( )
libName = cv_id~>libName

db_id = dbCreateInstByMasterName(
cv_id;d_cellView
libName;t_libName
"ClipBoardBuffer";t_cellName
"layout";t_viewName
nil;t_instName
refPoint;l_origin
"R0";t_orient
1;[ x_numInst ]
) ; => d_inst / nil

geDeselectAllObject( )

geSelectFig( db_id )

geMoveSelSet( hiGetCurrentWindow() refPoint )

dbFlattenInst(
db_id;d_instId
1;x_levels
nil;[ g_flattenPCells ]
t;[ g_preservePins ]
t;[ g_preserveRODobjs ]
); => t / nil

)
)
 
Thanks for the code. We tried it out and it almost gives us what we
want. We're going to have to do a little more playing to see if we can
improve to the functionality that we are looking for.
 
shumble1@irf.com wrote:
Thanks for the code. We tried it out and it almost gives us what we
want. We're going to have to do a little more playing to see if we
can
improve to the functionality that we are looking for.
I wouldn't mind seeing your improvements. There is always a better way
of doing something and your alterations may prove useful to me!
 

Welcome to EDABoard.com

Sponsor

Back
Top