Product : Engine, Version : 4.0.0.1017, ArticleID : 41017020

HowTo : How can I check if a XProperty exists or not in C++?

Article41017020
TypeHowTo
ProductEngine
Version4.0.0.1017
Date Added3/11/2003
Submitted byChrister Eckard
Keywords

Subject

How can I check if a XProperty exists or not in C++?

Summary

CvdLayer l=m_Vdraw.GetActiveDocument().GetFromID(layer_id);
CvdXProperties q=l.GetXProperties();
CvdXProperty p;
p=q.FindName("cutterdiam"); 

Solution

After the p=q.FindName("cutterdiam"); code add this :

if (p.m_lpDispatch)
{ 
// ok found 
}