How to search Line and delete through coding

Hello,
I have a problem in Drafting.
I am trying to search and delete Lines through .vb.
I tried it by recording journal and it's working but I want to search lines by the "Name".

Below is the code which i got by recording Journal.
Dim objects1(3) As NXObject
Dim line1 As Line = CType(workPart.Lines.FindObject("ENTITY 3 3 1"), Line)

FindObject("ENTITY 3 3 1") : What is this indicate ?

I want to search line through some name like FindObject("Curve 1"). and want to delete it.
Please help me to solve this issue.

Regards,
Bhavik

The string "ENTITY 3 3 1" is a name that NX has assigned to an object. This name is used internally by the journal recorder; in general, these names are fairly useless to us as programmers.

If you have given an object a custom name and now want to find that object by name, you should look at:
http://nxjournaling.com/comment/1766#comment-1766

the code in the link above looks for a named feature. The code to find a named line object would be very similar, but it would need to iterate through the ".Curves" collection instead of the ".Features" collection.

Generally, you should eliminate all "FindObject" calls from your code. This is one of the basic steps in converting a recorded journal into a useful application.

There's a description of the available approaches in the "Getting Started with SNAP" guide. Look at the chapter entitled "The Jump to NX Open".