Skip to main content
15-Moonstone
February 7, 2014
Question

Reorder a feature to first position

  • February 7, 2014
  • 3 replies
  • 1128 views

System : Wildfire 4


Hi @ all,



I try to create a coordinate system and reorder it to the first position in the model tree. The creation is no problem. After that i create an array and shift the newly created feature up to position two.


So I want to get it to position one, but thats not possible.


I can also reorder all other features to the last number. But if there are references between these features I get a failure while reorder.


Have someone an idea how to solve this problem?


Code:



ids[0] = newFeat.id;

tkerr = ProFeatureReorder((ProSolid)mdl, ids, 1, 2);

free(ids);


So I use this to get it to number 2 in tree, but number 1 is not possible (Error: -2 BAD_INPUTS). Every other number is possible.




tkerr = ProFeatureReorder((ProSolid)mdl, ids, idCount, idCount+1);

free(ids);


So the other solution I tested.



Thx for your answers,


best regards,


Eike


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

3 replies

15-Moonstone
February 7, 2014

Ok ... I found a solution.


I create the feature as last feature, Move it to position 2 and then move feature one to position 2.


After that the new feature is on position 1.


Perfect. : )



If you need it remember that groups and group patterns can be also be the first feature.



Best reagards,


Eike

13-Aquamarine
February 7, 2014
Eike,
What I have done in the past is set the insertion point with ProFeatureInsertModeActivate() before I create the new feature.

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01CF23F6.EB40C050]
15-Moonstone
February 10, 2014

Hi Patrick,


thats right. I test with that command,too. But the problem is that you can't set the insert mode at the first feature position. You also can't set it there manually.



Best regards,


Eike