×
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

parametric line equation in vb
2

parametric line equation in vb

parametric line equation in vb

(OP)
tell me the code to draw line using parametric equation in vb

RE: parametric line equation in vb

Look up the "law curve" topic in the NX help: CAD -> Modeling -> Curve -> Law Curve.

www.nxjournaling.com

RE: parametric line equation in vb

avi19:

The easiest way to discover code required for NX Modeling tasks is to:

a. Turn on Journal recording.
Pre-Ribbon UI: Tools --> Journal --> Record
Ribbon UI: Developer (Tab) --> Journal (Group) --> Record (button)

b. Give your new journal file a name and save it in a convenient location.

c. Perform the NX operation for which you want to create code. (In your case, drawing a line...)

d. Stop the Journal recording.
Pre-Ribbon UI: Tools --> Journal --> Stop Recording
Ribbon UI: Developer (Tab) --> Journal (Group) --> Stop Recording (button)

e. Open the journal file, and observe the code.

You can always search for things in the NX Open API Documentation, but just recording a Journal is almost always faster. smile

Oh... and remember that you can choose to record your Journal in VB, C#, Java, or C++, depending on your programming language of choice. (Tweak this setting in the UI Preferences dialog.)

Does that help?

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)

RE: parametric line equation in vb

(OP)
thank you!!!!!!!!!!

all i want to do is construct a whole geometry(Art Designs) and i want to perform scale , rotate , translate etc operations about a point. please tell me the way to do it. journal recording is the way but i want to make it generalized so having a general code will be better i think.....

RE: parametric line equation in vb

Do the NX pattern commands not meet your needs?

www.nxjournaling.com

RE: parametric line equation in vb

Suppose you have a line with parametric equation P(t) = (1 - t)*P0 + t*P1. In other words, your line starts at the point P0 = (x0,y0,z0) and ends at the point P1 = (x1,y1,z1).

The VB code to create (and draw) a line using NX/Open functions is:

CODE --> VB

Dim p0 As New NXOpen.Point3d(x0,y0,z0)
Dim p1 As New NXOpen.Point3d(x1,y1,z1)
Dim myLine As NXOpen.Line = workPart.Curves.CreateLine(p0, p1) 

If you use SNAP functions, it's a bit easier. The VB code is just:

CODE --> VB

Dim myLine As Snap.NX.Line = Snap.Create.Line(x0,y0,x1,y1) 

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