Hello,
we are in the process of migrating from v8i to Connect SDK. We have many dlls and we need a little help to find some references that are probably relocated, or new ways to do the things we used to do through the old SDK.
Lately we had been programming in C#, wrapping dlls as needed.
Here is an example of code from a typical situation.
What is the straightest way to write this piece of code to work with Connect edition?
[DllImport("stdkisolid.dll")]
private static extern void mdlKISolid_beginCurrTrans(int modelRef);
[DllImport("stdkisolid.dll")]
private static extern int mdlKISolid_listCreate(ref int lP);
... // Some other imports from stdkisolid.dll
public List<Edge> List(Element element, ModelReference model)
{
List<Edge> edges = new List<Edge>();
if (element == null) return edges;
mdlKISolid_beginCurrTrans(model.MdlModelRefP());
int list = 0;
mdlKISolid_listCreate(ref list);
int body = 0;
Transform3d tMatrix = new Transform3d();
mdlKISolid_elementToBody2(ref body, ref tMatrix, element.MdlElementDescrP(false), model.MdlModelRefP(), (int)1L, 0);
mdlKISolid_applyTransform(body, ref tMatrix);
mdlKISolid_getEdgeList(list, body);
int count = 0;
mdlKISolid_listCount(ref count, list);
for (int index = 0; index < count; index++)
{
... // Some stuff
}
mdlKISolid_listDelete(list);
mdlKISolid_endCurrTrans();
...
}