<?xml encoding=”UTF-8″>By Adam Nagy
The easiest way to check is by debugging into the code and see what object type the Watches window shows.
E.g. the following code …
Sub TestObjects()
Dim f As Face
Set f = ThisApplication.ActiveDocument.SelectSet(1)
Dim paramRange As Box2d
Set paramRange = f.Evaluator.ParamRangeRect
Dim oc As ObjectCollection
Set oc = f.Evaluator.GetIsoCurve(paramRange.MinPoint.X, True)
End Sub
… would show this in the Watches window when I select the side face of a cylinder:
In case of VB and VB.NET you can also use the TypeName function to find out the type name of an object:
Sub TestObjects()
Dim f As Face
Set f = ThisApplication.ActiveDocument.SelectSet(1)
Dim paramRange As Box2d
Set paramRange = f.Evaluator.ParamRangeRect
Dim oc As ObjectCollection
Set oc = f.Evaluator.GetIsoCurve(paramRange.MinPoint.X, True)
Dim item As Object
Set item = oc(1)
Call MsgBox(TypeName(item))
End Sub

Leave a Reply