How do I copy sketches to Clipboard???

Valued Contributor
Valued Contributor

 

Hi all!

I want to copy  outline of sketches to Clipboard,and then paste it into another sketch.

I would like to how to achieve?

Please help!

Thanks!

 

Posted by: fat kids
Post date: 1/12/2010 2:54:59 AM

3 REPLIES

RE: How do I copy sketches to Clipboard???

Valued Contributor
Valued Contributor

 

If the second sketch does not exist then you are looking for:

Sketches.AddByTearOff method

 

If the second sketch exists, i guess that you have to add the profile elements in the first sketch to the part SelectSet:

'These lines are by heart. They might have a mistake. Sorry, no time for more right now.

oCircle2D=oPart.Sketches.Item(1).Profiles.Item(1).Circles2d.Item(1) 'First Circle in first profile in first sketch.

oMySelectSet=oPart.SelectSet

oMySelectSet.Add oCircle2D

oMySelectSet.Copy

 

oPart.Sketches.Item(2).Profiles.Item(1).Paste 'if there is an existing Profile in sketch 2 or

 

oMyProfile=oPart.Sketches.Item(2).Profiles.Add(oRefPlane) 'Create a new profile in sketch 2.

oMyProfile.Paste

oMyProfile.End (condition) 'See help

 

Posted by: Julian Guillo
Post date: 1/19/2010 3:46:00 AM

RE: How do I copy sketches to Clipboard???

Valued Contributor
Valued Contributor

You may want to try the select set's "CopyProfile" method (there is a "CutProfile" method too). I believe you just add the profile to the select set and then call CopyProfile.

 

Posted by: R.D. Holland
Post date: 1/26/2010 4:19:42 AM

RE: How do I copy sketches to Clipboard???

Valued Contributor
Valued Contributor

Thanks Julian Guillo and R.D. Holland!

Let's me try!

 

Posted by: fat kids
Post date: 1/28/2010 6:41:50 PM