×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

save part components selectively using open api

save part components selectively using open api

save part components selectively using open api

(OP)
Hi all
How to use NX C++API to save part's components selectively. For example, I have components A, B, C created in one program routine. And I want to save A and C, but not B.

How to implement it? Can we use UF_PART_close/UF_PART_open to do it? When I want to save one component, do UF_PART_open, otherwise UF_PART_close. Is it the way to do it?

Thanks

RE: save part components selectively using open api

(OP)
also, is there a function can save a particular component based on its tag? for example, in the form of: UF_PART_save(&tag_t)? So it can chose which one to save?

RE: save part components selectively using open api

(OP)
Anyone knows the solution? How can we save the parts selectively?

Thanks

RE: save part components selectively using open api

I have done somthing simular using C where I temporaily change the part I want to save to the work part then save work only and then switch back to original work part.

CODE --> C

static int save_one_file(tag_t part_to_save, tag_t org_wrk_part)
{
	int
		savrsult,
	tag_t
		prev_work_part;
	if (part_to_save != org_wrk_part)
	{
		create_backups(part_to_save);
		UF_CALL(UF_ASSEM_set_work_part_quietly(part_to_save, &prev_work_part));
		savrsult = UF_CALL(UF_PART_save_work_only());
		UF_CALL(UF_ASSEM_set_work_part_quietly(prev_work_part, &part_to_save));
	}
	else
	{
		savrsult = UF_CALL(UF_PART_save_work_only());
	}
	return(savrsult);
} 

RE: save part components selectively using open api

(OP)
Thanks for your reply moudy1. Sorry I could reply you earlier.

The problem has been solved. Many thanks!
Gan

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources