cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Feature copy from one file to other file

Ketan_Lalcheta
19-Tanzanite

Feature copy from one file to other file

Hello

I have a sketch in one part file and same I would like to use into other part file.

I am following below steps:

  1. Get Feature handler of sketch from first file
  2. Use API ProFeatureSectionCopy() to get handler of section
  3. Define element tree for new sketch into second part
  4. Set value of element "PRO_E_SKETCHER " from section retrieved in step 2
  5. Create feature

I am not able to get all the entities into new sketch feature all the times. Even though some times I get entities, sketch is not fully placed due to changed references.

Any thought on same will be of great help.

Thanks in advance!

Regards

Ketan

6 REPLIES 6

It should be a lot simpler to copy sketches, but it's not.

Most of us do not take the time to make sketches "independent".

For sketches to be useful as library items, they need only 2 constraints to tie it to the universe since the 3rd is the sketch plane.

This is not how we think or use sketches normally, so it does take extra effort to copy it.

To make use of the existing sketches:

In the original file, open the sketch and delete the references.

Rebuild the sketch so it is self-constrained and you can move it around without it blowing up.

Now save the section file.

Quit the part and erase in memory so no unintentional updates remain.

There may be other ways like copy and paste, but I don't run into this often enough.

If I need to reuse the same thing over and over, I will make a palette sketch specifically to do what I need.

I may be asking very basic question, but could you please let me know more about palette sketch?

The palette sketch is a place where you can organize your section files.

These files show up in the sketcher palette once properly located.

It sounds like you are working on the programming end.

You might see if the sketcher palette is useful in programming.

Yes, I am going to explore this through programming... If I have saved it in pallette, will the same be available for revolve? Any help document will be useful to understand and manually try this first.

Yes, sections can be treated independently for all features that use them.

Don't forget to define a revolve axis.  If more than one axis exits in the sketch, it can be problematic.

I suggest using an external reference revolve axis to ensure compliance.

If you want to reuse features from one part to another, then it's very possible, although Creo user interface often tries hard to make it difficult

This is what I do:

Activate the window of the source part.  Make it 1/2 screen size (use the Windows + left arrow key).

Select the feature(s) you want to copy.  CTRL+C to copy, or click the icon in Model tab/Operations/Copy.  (incidentally, if for some reason you can't copy them the icon will be grayed out).

Activate the window of the target part.  Make it 1/2 screen size such that you can see the source (use Windows+ right arrow key).

Now use the "paste special" command (Model tab/Operations/Paste->Paste Special).  Use the "Advanced reference configuration" option.

The rest is basically specifying the feature references in the target part that correspond to the references in the source part.

(the window resizing is necessary to be able to see the source and target parts simultaneously.  Also, often the Advanced Reference Configuration dialog box can get lost behind other windows, and that one does not show up in the taskbar - but it does show up in the task manager!)

Top Tags