Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: How to create PlanActivity using code?

$
0
0

first, need get the project,then coding like this:

 

Plan plan = (Plan)PlanHelper.service.getPlan(ObjectReference.newObjectReference(project));

PlanActivity activity = PlanActivity.newPlanActivity(WTContainerRef.newWTContainerRef(project));

activity.setName("name");

activity.setLineNumber(4);   //this is important to display the PlanActivity

activity = (PlanActivity)PlanHelper.service.addToPlan(activity, plan);


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>