Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AddByCenterRadius, can the last parameter be NULL in C++?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
oransen
427 Views, 3 Replies

AddByCenterRadius, can the last parameter be NULL in C++?

I've seen some code like this

 

CComPtr<SketchCircle> pSketchCircle;
pSketch->SketchCircles->AddByCenterRadius(pCenter,kDiam/2.0,&pSketchCircle);

 

But if I don't care about getting the actual object created can I pass NULL instead of &pSketchCircle?

 

 

Tags (1)
3 REPLIES 3
Message 2 of 4
xiaodong_liang
in reply to: oransen

Hi,

 

I do not think so. But if you do not need the circle object, you could use the other function MethodXXX.

Message 3 of 4
oransen
in reply to: xiaodong_liang

Actually I've just looked at the intellisense function prototype, and the last parameter is a default parameter and the default parameter is 0.

 

So yes, if you don't pass in a pointer to a circle then the last parameter is NULL by default.

 

Message 4 of 4
xiaodong_liang
in reply to: oransen

Hi,

 

yes, you are correct. The param in this case can be NULL. I confused with others which require the param to be initialized. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report