Article | 41023998 |
Type | HowTo |
Product | Engine |
Version | 5.1.1.1037 |
Date Added | 6/3/2005 |
Submitted by | Eric Che |
Keywords |
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);