×
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

BLK FORM

BLK FORM

BLK FORM

(OP)
Hi.
Is there a solution to get correct values into the BLK FORM?
I have some ideas, but no solution:
Can I get the min. and max. coordinatesof a block with Journal?
Can I get expression values with Journal?
Can I get point coordinates with Journal?
Can I get point coordinates in a Machining Csys. with Journal?
Thanks in advance,

----
kukelyk

RE: BLK FORM

Run this code with one or more block objects in the part, perhaps it will help.

CODE

Option Strict Off  
Imports System  
Imports NXOpen  
Imports NXOpen.Features  

Module NXJournal  
Sub Main  


Dim s As Session = Session.GetSession()  
Dim ui As UI = UI.GetUI()  
dim workPart as Part = s.Parts.Work  
Dim lw As ListingWindow = s.ListingWindow  
lw.Open()  

Dim featArray() As Feature = workPart.Features.GetFeatures()  

Dim blockFeatureBuilder1 As Features.BlockFeatureBuilder  


For each myFeature as Feature in featArray  
 'lw.WriteLine(myFeature.GetFeatureName)
	lw.WriteLine(myFeature.FeatureType)  
	if myFeature.FeatureType = "BLOCK" then  
		blockFeatureBuilder1 = workPart.Features.CreateBlockFeatureBuilder(myFeature)  
		lw.writeline("origin: " & blockFeatureBuilder1.Origin.ToString)  
		lw.writeline("type: " & blockFeatureBuilder1.Type.ToString)  
		lw.writeline("height expression name: " & blockFeatureBuilder1.Height.Name)  
		lw.writeline("height expression value: " & blockFeatureBuilder1.Height.Value.ToString)  
		lw.writeLine("length expression name: " & blockFeatureBuilder1.Length.Name)  
		lw.writeLine("length expression value: " & blockFeatureBuilder1.Length.Value.ToString)  
		lw.writeLine("width expression name: " & blockFeatureBuilder1.Width.Name)  
		lw.writeLine("width expression value: " & blockFeatureBuilder1.Width.Value.ToString)  
		lw.writeline("")  
	end if  
Next  
blockFeatureBuilder1.Destroy()  
lw.Close  

End Sub  
End Module 

www.nxjournaling.com

RE: BLK FORM

(OP)
Thanks for your help.
Your code is OK, but I have some problem with it.
There is a Block feature in my CAM template, what I use as 'Blank'.
1. If I link the master model to the CAM, there will be 2 bodies.
2. The block has a different size, so I have to change it, Offset, Move face, etc.
If I resize the block, and Move the block's upper face center point to 0,0,0 :
The 'move face' may has no parameter values.

If I make two points to the corners of the block, they will link to the endpoints, so they also have no parameter values.
If I create 6 measurements, from the 0,0,0: it is correct, but how can I get them with the Journal?

OK, if we redefine the block, it will give correct information, but there can be other blocks, like check bodies, etc.

Thanks in advance

----
kukelyk

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