Hi,
ich komme echt nicht weiter. In meiner Methode möchte ich ein Makro einfügen, muss ich da einen LockigStep initialisieren? Und wenn ja, wie muss ich das tun. Hab schon alle möglichkeiten ausprobiert. Beim Debuggen springt er erst garnicht in die Methode sondern bringt gleich die Fehlermeldung Objekt nicht gefunden.
Hat jemand ne idee?
private void SetMac(BoxedDevice device, Project ConfigurableProject)
{
LockingStep LS = new LockingStep();
string MacroPath = SeperateString("DE", device.Properties.FUNC_CUSTOM_SUPPLEMENTARYFIELD03);
Page oPage = device.Page;
double oPointDX = device.Location.X; //Einfügepunkt von Gerätekasten,
double oPointDY = device.Location.Y; //immer links oben
double Height = device.LogicalArea.Y; //Height of the BoxedDevice
PointDbl oPointDBL = new PointDbl(oPointDX, (oPointDY - Height)); //corner down left
WindowMacro NewMacro = new WindowMacro();
try
{
NewMacro.Open(MacroPath, ConfigurableProject);
}
catch
{
return;
}
Insert oInsert = new Insert();
StorableObject[] oStorableObject = oInsert.WindowMacro(NewMacro, NewMacro.Variant, oPage, oPointDBL, Insert.MoveKind.Absolute);
device.Remove();
LS.Dispose();
}
Gruss Karlheinz
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP