×
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

NX8.0 VB run - slow response

NX8.0 VB run - slow response

NX8.0 VB run - slow response

(OP)
Hi all,

Although I have a long time experience with NX, I cannot find what is wrong when opening a large assembly and running a script.

I run a custom script in vb to handle attributes. The script reads some attributes of the work part and I have a windows interface to change them as I like and do

When I open a part of a subassembly (only 27 parts of that subassembly loaded in memory) and run the script is super fast (it takes about 1~2 secs). But when I open the same part inside a greater assembly (~1800 parts loaded in memory) that contains the previous mentioned subassembly and run the script (doing the exact same things, not interacting with other parts of the assembly) it takes for ever. Sometimes up to 5 minutes.

My point is that as long as I have open a part as work, it shouldn't take that long because the only thing that the script does is to change the attributes.

On the information bar it says "updating objects" all time. I had no issue with NX7.5 on this. The computer is quite powerful.

I have tried to enter manually the attributes to see if there is the problem. Apart from the new interface that handles the attributes, I have noticed that you cannot enter an attribute with more than 30 characters. Say what? Why? OK, but why don't I have the same problem If I have only few parts loaded in memory.

Thank you in advance.

Stathis

RE: NX8.0 VB run - slow response

Well, it sounds like you are not changing the attributes just for the work part, but for all parts in the assembly... or am I making a wrong assumption? Also, what attributes are you changing? Component attributes or actually part attributes? Can you provide some code?

Marc
NX Software Developer
 

RE: NX8.0 VB run - slow response

(OP)
Thanks Mark for your reply.

Unfortunately this is not the case. I tried to change the attributes manually and had the same time delay.

To give you more details: I start by opening the component inside an assembly , that I want to change attributes, as a work part. So, I change the actual part attributes in order to use them later when I do the draftings. The program reads the part attributes if any and writes them temporarly to txt files and then a windows basic form app opens and reads them again (I use VB 10 Express, and cannot make run from inside UG so I call it through the vb script and do the transaction through read and write). When finished editing the attributes the vb script reads them again and updates the part. Not very sophisticated but it does what I need.

Here the whole vb script. The windows form it is just an interface to change the text files.


http://files.engineering.com/getfile.aspx?folder=f3d7c0ce-698d-4137-8143-28ce145e3a76&file=Desktop.zip

RE: NX8.0 VB run - slow response

Hi,

I just took a look at your code. I believe part of the problem is how you designed your program. Writing the value of one attribute in one temporary file is a potential performance killer. Why not write all the attributes you need in one file? E.g. <title> = <value>, one per line.

Quote:


(I use VB 10 Express, and cannot make run from inside UG so I call it through the vb script and do the transaction through read and write).

Does this mean you cannot create a DLL with VB 10 Express? Or do you not have a NXOpen / UGOPEN license?

Marc
NX Software Developer
 

RE: NX8.0 VB run - slow response

(OP)
Hi Marc,

I could do write all the attributes that I need in a file. But nevertheless, I don't think that it would make much of a difference given the fact that I tried to manually (from inside NX) to change only one attribute and did take long time to change it. So, I think that the most of the problem comes with the way that NX8 handles now the attributes. I didn't have any delays with NX7.5 (whatever size the assembly had).

When I first noticed the great delay, I did some tests. I was killing the process of the script in several time intervals, in order to see in which line had it progressed. All times the line was where it wrote the attribute to the part. I tried as I told you before to change them manually and had the same delay. So, I think that the problem is at the way/process of NX writing the attributes to the part.

I know that NX did some changes to the attributes so, I downloaded from ftp/ugs the documentation, but regarding the NXOPEN section it is the same as for NX7.5, nothing new added yet.
We have 2 licences ugopen_menuscript but none for styler. To tell you the truth, I am not a programming expert. I use only the basics to do enhance my job.

Thanx,

Spada

RE: NX8.0 VB run - slow response

What about load options and part complexity? In NX7.5 I have come to realize that just setting a complex part (multiple bodies, large amounts of blends, ...) as the work part can take several seconds, during which "Updating objects..." is displayed.

Marc
NX Software Developer
 

RE: NX8.0 VB run - slow response

(OP)
Hi Mark,

Sorry, what do you mean by load options? Why load options would affect a script to a part inside an assembly that it has opened as work part and because of that, fully.

The problem is not during making the part as work but after it is work part, applying the attributes that I want. And as you have seen inside my program isn't something special.

Thanks,

Spada

RE: NX8.0 VB run - slow response

(OP)
Even if I enable the delay to all interpart updates it takes for ever to write the attributes to the part.

I keep seeing the updating objects while I am waiting the whole process to complete. Do you know what exactly gets updated if someone writes an attribute to a work part and hits apply. If I knew what exactly was updating maybe I could figure out how to handle it better.

Thanks,

Spada

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