Product : Engine, Version : 5.1.1.1037, ArticleID : 41023998

HowTo : Adding hidden informations in the drawing that can not be purged or erase.

Article41023998
TypeHowTo
ProductEngine
Version5.1.1.1037
Date Added6/3/2005
Submitted byEric Che
Keywords

Subject

Adding hidden informations in the drawing that can not be purged or erase.

Summary

Adding hidden informations in the drawing that can not be purged or erase.

Solution

 1.Create a block without entities.

2.Put some of your XProperties informations in the block

3.Add an Invisible Insert object reference the previous block in the layer "0"

 

Example in VC++ 6

 COleVariant pt = XYZToVariant(0,0,0);
 CvdBlock blk=m_Vdraw.GetActiveDocument().GetBlocks().Add(_T("infoBlk"),pt);
 CvdXProperties Lst=blk.GetXProperties();           //add the xproperty into blk
 COleVariant var("ValueString");
 Lst.AddXProperty("testData",1000,var);
 CvdInsert ins =m_Vdraw.GetActiveDocument().GetModel().GetEntities().InsertBlock(pt,blk.GetName(),1.0,1.0,0.0);
 ins.SetLayerName("0");
 ins.SetHighLight(2);