开发者

Null Reference Exception on using Adobe3D Reviewer class

I am new to programming in VB. I am trying to use a built-in interface in the Adobe3DReviewer in my code. I need to use a method of the interface so I am trying to create an object. However, when I try to use the object to access the method I get this error:

System.NullReferenceException was unhandled.Object reference not set to an instance of an object.

I am not sure where I am going wrong. Any suggestions/comments will be greatly appreciated.Here is my code snippet:

Module Module1
Sub Main()
Dim attVal As New Object
Dim geomItemObject As Adobe3DReviewer.GeomItem
    geomItemObject = Nothing
  attVal = "value"
//The error is thrown at this line.
geomItemObject.AddAttribute("hi", attVal)
End Su开发者_开发知识库b

End Module


You set geomItemObject to Nothing, which is causing the exception. Perhaps you need Dim geomItemObject as New Adobe3DReviewer.GeomItem.

Sorry, can't be more specific but i don't know Adobe3DReviewer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜