Cancel
Showing results for 
Search instead for 
Did you mean: 

Read part names from excel in NX Managed mode

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi All,

 

I'm trying to read part names from excel, open them one-by-one and do some work.

But I'm getting error:

 

EI.JPG

Code:

 

        Dim p as string
        p = "@DB/" & objExcel.cells(2, 1).value & "/A"
        
        objExcel.cells(1, 6).value = p

        theSession.Parts.SetNonmasterSeedPartData(p)

        Dim basePart1 As NXOpen.BasePart = Nothing
        Dim partLoadStatus1 As NXOpen.PartLoadStatus = Nothing
        basePart1 = theSession.Parts.OpenActiveDisplay(p, NXOpen.DisplayPartOption.AllowAdditional, partLoadStatus1)

 

The p value is correctly returned from excel like this: @db/21310/A

Regards,
Samadhan

GTAC | NX Help: NX1102 | NX1202 | NX1847
Please mark post as an "Accepted Solution", if it answers your question/is more helpful!