Cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error no object found with this name

Valued Contributor
Valued Contributor

Hi All,

 

Below is the code where I'm looping thru all FCFs. But getting error at last line-

        For Each myFCF In workPart.Annotations.fcfs.ToArray()
             Dim x as string 
             x = myFCF.JournalIdentifier
            MsgBox (Chr(34) & x & Chr(34))
        Dim markId1 As NXOpen.Session.UndoMarkId = Nothing
        markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Start")
        Dim fcf1 As NXOpen.Annotations.Fcf = CType(workPart.FindObject(Chr(34) & x & Chr(34)), NXOpen.Annotations.Fcf)

Any help will be appreciated.

3 REPLIES

Betreff: Getting error no object found with this name

Legend
Legend

You won't find any object if you add double quotes to the search string.

 

 

Regards,

Jan

 

Jan Böttcher

Betreff: Getting error no object found with this name

Valued Contributor
Valued Contributor

Thank you Jan for your reply that solved my problem.

Actually I was trying to replace value in x which is handle id with double quote as recorded journal showed double quotes.

 

-Samadhan

Betreff: Getting error no object found with this name

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

The journal uses a literal string, so the double quotes are mandatory.

If you use a variable, you don't need the double quotes.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide