×
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

NX11.0 ______ NXOpen: clean History
2

NX11.0 ______ NXOpen: clean History

NX11.0 ______ NXOpen: clean History

(OP)
Hi,

I try to clean my history in a NXOpen program but I can't find the good way because I can't use the journal.
I code my Program in C# (but i can use vb). Could you help me?

In advance, thanks a lot for your help.

B/R

RE: NX11.0 ______ NXOpen: clean History

What do you mean by "cleaning the history" (part history or the list of recently opened files in NX)? What are you trying to accomplish?

"I can't use the journal."
No journal will run for you? You found a specific journal, but can't get it to run? Something else?

www.nxjournaling.com

RE: NX11.0 ______ NXOpen: clean History

(OP)
Hi cowski!
First, thanks for your help.

What I mean by cleaning the history is to clear the list of recently opened files in NX.
I try to read the code with the journal but it's empty...that's why i ask some help smile

RE: NX11.0 ______ NXOpen: clean History

Close NX then delete (or rename, if you want the option to recover it later) the history.pax file found in {user folder}\AppData\Local\Siemens\NX110 folder (this assumes the default install location - find the corresponding location if you have customized your install). Restart NX, it will create a clean (empty) history.pax file.

www.nxjournaling.com

RE: NX11.0 ______ NXOpen: clean History

(OP)
Cowski,
Ok for the .pax file but it's not the way I want to follow...

What I try to do: I use a NXOpen program to open and close a lot of part. If my user check on his history, he can see the opened parts and I don't want. So I try to find a solution for cleaning this history with a NXOpen command to put it at the end of my NXOPen program (dll)

Many thanks.

B/R

RE: NX11.0 ______ NXOpen: clean History

The .pax file is really an XML file; the .net framework has tools to help you read/write to XML files. I'm not sure how (or if it's possible) to force the history palette to update (to changes in the pax file) while NX is running. I know that it will update the next time NX is started; I suspect that NX reads the history.pax file at startup and holds the information in memory.

www.nxjournaling.com

RE: NX11.0 ______ NXOpen: clean History

Just curious. What would be the reason why you don't want them to see the recently opened parts?
Because, as a User, that would really tick me off. I would want to be able to continue working on the part(s) where I left off the day before.

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX12 / TC11

RE: NX11.0 ______ NXOpen: clean History

(OP)
@cowski: thanks I will follow this way and try to find a NXOpen command to manage it.

@Nutace: It's simple, in my program I must open all the part of my assembly (250 parts), of course, it will take a long time and my user will launch it on the nigth. When it will be finish, the history list will be full and not pleasant to use...

@both: have a nice day!

B/R

RE: NX11.0 ______ NXOpen: clean History

Looks to me that there is something wrong with your program then. If I open an assembly with 250 parts, I don't see all those parts in my history.
Only the assembly will show there.
Are you opening all the parts one by one for some reason?

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX12 / TC11

RE: NX11.0 ______ NXOpen: clean History

(OP)
Yes, I modify an attribute.

RE: NX11.0 ______ NXOpen: clean History

Quote (Pjone kenobi)

Yes, I modify an attribute

But for that you don't have to open each part separately. You just open the assembly, cycle through it and make each component workpart and modify the attribute.
Just thinking about a different approach here to avoid coding which is not neccesary... ;)

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX12 / TC11

RE: NX11.0 ______ NXOpen: clean History

I agree with NutAce.
In your code, change your load options (if necessary) to open all components and turn off partial loading. As long as you have a valid reference to a fully loaded part, you can change the part attributes. You don't even need to make it the work or display part.

Also note that if you don't need access to the NX UI, you can change your code to run in "batch mode". This might speed it up a little since the graphics won't be shown; and I'm not 100% certain, but I think the parts you open won't show up in the history.

www.nxjournaling.com

RE: NX11.0 ______ NXOpen: clean History

(OP)
Hi,

Sorry for my late reply but I was out of my office.
I understand what you mean exactly, but I'm a rookie in NXopen programming so the only way I found is I open all the part I have in my folder to change the attribute. To save time I used a different loadoption.
See below:
foreach (var item in files)
{
try
{
theSession.Parts.LoadOptions.ComponentsToLoad = NXOpen.LoadOptions.LoadComponents.None;

//theSession.Parts.LoadOptions.UsePartialLoading = false;

//theSession.Parts.LoadOptions.UseLightweightRepresentations = false;

theSession.Parts.LoadOptions.SetInterpartData(false, NXOpen.LoadOptions.Parent.All);
Part thePart = theSession.Parts.Open(item, out PartLoadStatus tyty);

thePart.SetUserAttribute("Folder_Attribute", -1, Folder, Update.Option.Now);

thePart.SetUserAttribute("Numero", -1, numero, Update.Option.Now);


thePart.Save(BasePart.SaveComponents.False, BasePart.CloseAfterSave.False);
Utilities.Echo("Fichiers modifiés " + item);
theSession.Parts.CloseAll(NXOpen.BasePart.CloseModified.CloseModified, null);
theSession.ApplicationSwitchImmediate("UG_APP_NOPART");
goto end;
}
}
catch (Exception exe)
{
//NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, exe.ToString());
}

}

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! Already a Member? Login


Resources

White Paper - How ESI is Helping Move New Medical Device Product to Market Quicker & More Cost Effic
Early Supplier Involvement has long been a strategy employed by manufacturers to produce innovative products. Now, it almost seems like a necessity. Because decisions made in the design phase can positively affect product quality and costs, this can help add value to OEM bottom lines. This white paper will discuss many facets of ESI, including why it’s so valuable today, what challenges limit the benefits of ESI, how cost is impacted, and more. Download Now
White Paper - Moving to a Driverless Future
This white paper describes what we see as the best practices to support a sustainable engineering process for autonomous vehicle design. It exposes how to use simulation and testing in common frameworks to enable design exploration, verification and validation for the development of autonomous cars at a system, software and full-vehicle level to drive a mature product development process for automated driving. Download Now
Research Report - How Engineers are Using Remote Access
Remote access enables engineers to work from anywhere provided they have an internet connection. We surveyed our audience of engineers, designers and product managers to learn how they use remote access within their organizations. We wanted to know which industries have adopted remote access, which software they are using, and what features matter most. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close