.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DWF Publish Reactor

0 REPLIES 0
Reply
Message 1 of 1
Moon
173 Views, 0 Replies

DWF Publish Reactor

Anyone knows how to set custom property by publish reactor
correctly? I have the code below,but it does not work! Help me
private static void Publisher_BeginEntity(object sender, PublishEntityEventArgs e)
{

ObjectIdCollection ids=new ObjectIdCollection();
Entity ent=e.get_Entity();
ObjectId id=ent.Id;
if (e.GetEntityNode(id,ids)==1) return;
int nodeid=e.GetNextAvailableNode();

DwfNode node=new DwfNode(nodeid,"dddd");
EPlotPropertyBag propbag=
new EPlotPropertyBag();

EPlotProperty prop1=new EPlotProperty("CCC","AAA");

propbag.Properties.Add(prop1);

propbag.Id=e.get_UniqueEntityId();

if (!e.AddPropertyBag(propbag))
MessageBox.Show("bag error");

if (!e.AddNodeToMap(id,ids,nodeid))
MessageBox.Show("map error\n");

if (!e.AddPropertiesIds(propbag,node))
MessageBox.Show("ids error:"+
CADApp.GetSystemVariable("ERRNO"));
}
}

It report ERRNO=2

Please Help me!
0 REPLIES 0

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost