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

From c++ to c# ename/selectionSet...question

0 REPLIES 0
Reply
Message 1 of 1
base2
304 Views, 0 Replies

From c++ to c# ename/selectionSet...question

I have a code c++ like this
and it's run correctly
________________________________________________
if ( acedSSGet (L"_I", NULL, NULL, NULL, sset) != RTNORM )
if ( acedSSGet (NULL, NULL, NULL, NULL, sset) != RTNORM )
return;

int stat;
struct resbuf *result = NULL, *list;
list = acutBuildList(RTSTR, L"mycommand", RTENAME,
sset, RTSTR, L"c:\\myfile.xxx", RTNONE);
if (list != NULL)
{
stat = acedInvoke(list, &result);
acutRelRb(list);
}
if (result != NULL)
{
acutRelRb(result);
}
}
_____________________________________________
so i've tried to translate it in C#...
but i have a problem with the selection set...


PromptSelectionResult ss = ed.SelectAll();
SelectionSet selset = ss.Value;

ResultBuffer args = new ResultBuffer();
int stat = 0;
args.Add(new TypedValue((int)RTSTR, "mycommand"));

// 'ive tried this:---------------------------------------1
args.Add(new TypedValue((int)RTPICKS,ss.value));
-// 'ive tried this:---------------------------------------2
args.Add(new TypedValue((int)RTENAME,ObjectID));
// where ObjectID is a single entity picked in video

args.Add(new TypedValue((int) RTSTR, "myfile.xxx"));
ResultBuffer res = b2Gbl.InvokeExtern(args, ref stat);
___________

the invoke run without errors... rtnorm is returned but it's don't produce the new file..
now some questions....

in c++ or Lisp I can build a selection set and handle this with "ename" type...
what's the equivalent in c# language ?

How can i produce programmatically a sset in c#
(ssadd ecc..)

thanks in advance....!
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