×
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

Journal - AskPointContainment

Journal - AskPointContainment

Journal - AskPointContainment

(OP)
A small program, a big problem:

CODE

Option Strict Off
Imports System
Imports NXOpen
Imports System.IO
Imports NXOpen.UF
Imports NXOpen.ASSEMBLIES
'- - - - - - - - - - - - - - - - - - - - - - 
Module NXJournal

Public theSession As Session = Session.GetSession()
Public theUI As UI = UI.GetUI()
Public theUFSession As UFSession = UFSession.GetUFSession()
Public workPart As NXOpen.Part = theSession.Parts.Work

Sub Main

Dim theSession As Session = Session.GetSession()
Dim theUI As UI = UI.GetUI()
Dim pointPos as Integer
Dim aPoint As Double()

aPoint(0) = 11
aPoint(1) = 0
aPoint(2) = 12.5

For Each aBody As Body In workPart.Bodies 
Dim a as integer = theUFSession.Modl.AskPointContainment (aPoint, aBody.Tag, pointPos )
Next  
End Sub
End Module 
error message: "Expression does not produce a value"

From the reference guide:
Returned status of the point on the body
1 = point is inside the body
2 = point is outside the body
3 = point is on the body
What is it?

----
kukelyk

RE: Journal - AskPointContainment

In your example, the returned value is the pointpos variable. In many of the UF functions you must supply variables for both input and output values, in this case aPoint and aBody.Tag are the inputs and pointPos is the output.

CODE

Dim a as integer = theUFSession.Modl.AskPointContainment (aPoint, aBody.Tag, pointPos ) 

www.nxjournaling.com

RE: Journal - AskPointContainment

(OP)
I am an absolute beginner in programing...Thanks again

----
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