Sphere object creation (usage of PutSphereData method)

Sphere object creation (usage of PutSphereData method)

Maxim-CADman77
Advisor Advisor
294 Views
1 Reply
Message 1 of 2

Sphere object creation (usage of PutSphereData method)

Maxim-CADman77
Advisor
Advisor

I'd like to know how to create Sphere object with iLogic.

 

I guess I need to use PutSphereData method, right?

I tried the below code

Dim oInv As Inventor.Application = ThisApplication
Dim oSph As Sphere = Nothing
Dim dRad As Double = 10

Dim crds(2) As Double
crds(0) = 0
crds(1) = 0
crds(2) = 0
oSph.PutSphereData(crds, dRad)

MsgBox(oSph.Radius,,"Sphere Radius")

I expected to get back "10" with Message Box but got "Object reference not set to an instance of an object" error instead.

What I' missing?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Accepted solutions (1)
295 Views
1 Reply
Reply (1)
Message 2 of 2

Michael.Navara
Advisor
Advisor
Accepted solution
0 Likes