Reply

No Items from SurfaceFinishSymbolDataSets

[ Edited ]

I try to get the items from a SurfaceFinishSymbolDataSets (from Draft-File with vb.net 2010).

I can "add" and "remove" a SurfaceFinishSymbolDataSet in SurfaceFinishSymbolDataSets but i get an error by "item" and "count".

Is it a bug from ST3?

 

Regards

JR

 

Posted by: JR
Post date: 6/21/2012 6:48:46 AM

3 REPLIES

Re: No Items from SurfaceFinishSymbolDataSets

[ Edited ]

JR,

 

Thanks for reporting this. Were you seeing E_NOINTERFACE when trying those two methods? I believe I've reproduced the error.

 

-Jay

 

Posted by: Jay Carlton
Post date: 6/26/2012 3:19:01 PM

Re: No Items from SurfaceFinishSymbolDataSets

[ Edited ]

JR,

 

This issue is now logged as PR #6737721.

 

By the way, how did you verify that Add and Remove are working if Item and Count aren't? Do you have any sample code I can add to the PR?

 

Thanks again,

Jay

 

Posted by: Jay Carlton
Post date: 6/26/2012 4:33:09 PM

Re: No Items from SurfaceFinishSymbolDataSets

[ Edited ]

Jay,

 

you can see "add" and "remove" directly/manualy in the Draft. if you know the name of SurfaceFinishSymbolDataSet

Example:

Dim objApp As SolidEdgeFramework.Application = Marshal.GetActiveObject("SolidEdge.Application")
Dim objDoc As SolidEdgeDraft.DraftDocument = objApp.ActiveDocument
Dim objSurfs As SolidEdgeFrameworkSupport.SurfaceFinishSymbolDataSets
Dim objSurf As SolidEdgeFrameworkSupport.SurfaceFinishSymbolDataSet

objSurfs  = objDoc.SurfaceFinishSymbolDataSets

    'Add new Item, you can see it in the Draft directly
    objSurf = objSurfs.Add("Example1")

    'Count Error:
    'MsgBox(objSurfs.Count)

    'Item Error:
    'objSurf = objSurfs.Item(1)

    'You can remove any Item by name
    'objSurfs.Remove("Example1")

    Marshal.ReleaseComObject(objSurf)
    objSurf = Nothing

    Marshal.ReleaseComObject(objSurfs)
    objSurfs = Nothing

    Marshal.ReleaseComObject(objDoc)
    objDoc = Nothing

    Marshal.ReleaseComObject(objApp)
    objApp = Nothing

I miss also the Property "Name" by SurfaceFinishSymbolDataSet.

The remove works only with "Name" but how can i get the Name without Property "Name"?

 

Regards

JR

 

Posted by: JR
Post date: 6/27/2012 12:59:47 AM