×
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

"Do loop" in NX

"Do loop" in NX

"Do loop" in NX

(OP)
Hi,

assume that I have a solid body with a relatively complex geometry with volume = V

what I would like to do is to offset one face deltax and calculate the new volume (Vnew) and write this volume to a file and repeat this step for n times...

I assume this is possible in NX but I dont know how to, I will be glad if you post a similar code, so that I can modify it to match my needs

well, I am not familiar to VB or C++ but the algorithm should do something like below

deltax= 0.1

do i=1,100
offsetvalue = deltax X i
//update the model with new offset value, obtain the new solid//
//re-calculate the volume = Vnew //

Volume(i) = Vnew (not neccassarily in array form, any non-confusing data/file type is OK)
end do
exit

Thanks in advance...
 

RE: "Do loop" in NX

What are you trying to do? Is it to solve for the amount of offset until the correct volume is reached?

Best Regards

Hudson

www.jamb.com.au

Nil Desperandum illegitimi non carborundum

RE: "Do loop" in NX

(OP)

well actually no...
What I am triyng to do is to get the change of the volume (or the rate of the change of the volume) with increasing offset distance. I am trying to do this in NX because as  I said the geometry is relatively complex thus I can not calculate it analytically... At the end of this study my goal is to plot deltax versus volume graph.

Thanks.
 

RE: "Do loop" in NX

Hi,
What about using Tools/Spreadsheet ?
Have you any experience with Excel ?
if not, here is the way to update the model with office 2007
assign a name to your solid
Tools / Spreadsheet
Tab / Complements or maybe add on in english
Extract expression
Add anywhere the formula: =mass3d("name of the solid";2;3)
Change the parameter deltax
Tab / Complements
Update NX
Then find a way to do a loop and a graph in Excel

Regards

Didier

RE: "Do loop" in NX


Attached is c# journal.

In your part file create your first offset and note down the expression name for the offset value.  Also, create a measure body by clicking the associative option on.  For that measure body feature note down the expression name for the volume.

In the journal file replace the name of the expressions with the corresponding expression names in your part file.

When you run the journal the results are listed to the listing window.

Hope this helps.

Suresh
www.technisites.com.au

RE: "Do loop" in NX

(OP)
ExpertNX & ufsure thanks for your helpful posts...

I am out of office now but I will try both methods as soon as possible and let you know about the results...

Thanks again..

best regards.
 

RE: "Do loop" in NX


Looks like you do not have that expression in your part file.  Make sure on line 21 of the original journal file you replace p398 with the name of your expression.  Include the inverted commas.

Suresh
www.technisites.com.au

RE: "Do loop" in NX

(OP)
I tried the journal but unfortunately I got error messages similar to those that ExpertNXs'
I am working on the journal, I will let you know if I can figure out the problem...

Best regards

i.

RE: "Do loop" in NX


If you can post your part file I may be able to look at the problem.  Thia journal was created in NX 6.0.2.8.

 

Suresh
www.technisites.com.au

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