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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

J-Link RedefineThroughUI

JoshBenson
2-Guest

J-Link RedefineThroughUI

I am writing a J-link app that needs to create a new assembly component from a start part, then open the interactive UI so the user can define the placement of the component. I have everything working up to the point of the RedefineThroughUI function call, which always throws the XToolkitUserAbort exception. Here is the portion of code in question, any ideas what I need to do differently?

 

//Assemble copy of start part (default position constraint)

ComponentFeat newFeature = (ComponentFeat)assembly.AssembleByCopy(partName,(Solid)startModel, false);

//Clear start part from memory

startModel.Erase();

//Create empty constraints

ComponentConstraints constraints = ComponentConstraints.create();

//Remove default constraint, leave component packaged

newFeature.SetConstraints (constraints, null);

//Prompt User to define component placement - everything works to this point...

newFeature.RedefineThroughUI();

 

Thanks,

 

Josh

0 REPLIES 0
Top Tags