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