Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IFRs on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

BLK FORM

Status
Not open for further replies.

kukelyk

Industrial
Mar 21, 2005
315
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
 
Replies continue below

Recommended for you

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

Code:
[COLOR=blue]Option[/color] [COLOR=blue]Strict[/color] [COLOR=blue]Off[/color]  
[COLOR=blue]Imports[/color] System  
[COLOR=blue]Imports[/color] NXOpen  
[COLOR=blue]Imports[/color] NXOpen.Features  

[COLOR=blue]Module[/color] NXJournal  
[COLOR=blue]Sub[/color] Main  


[COLOR=blue]Dim[/color] s [COLOR=blue]As[/color] Session [COLOR=blue]=[/color] Session.GetSession()  
[COLOR=blue]Dim[/color] ui [COLOR=blue]As[/color] UI [COLOR=blue]=[/color] UI.GetUI()  
[COLOR=blue]dim[/color] workPart [COLOR=blue]as[/color] Part [COLOR=blue]=[/color] s.Parts.Work  
[COLOR=blue]Dim[/color] lw [COLOR=blue]As[/color] ListingWindow [COLOR=blue]=[/color] s.ListingWindow  
lw.Open()  

[COLOR=blue]Dim[/color] featArray() [COLOR=blue]As[/color] Feature [COLOR=blue]=[/color] workPart.Features.GetFeatures()  

[COLOR=blue]Dim[/color] blockFeatureBuilder1 [COLOR=blue]As[/color] Features.BlockFeatureBuilder  


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

End [COLOR=blue]Sub[/color]  
End [COLOR=blue]Module[/color]

www.nxjournaling.com
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor