public static ElementHandle GetElement(string path) { lock (XEditLibWrapper.LockObject) { ThrowOnError(XEditLibWrapper.GetElement(0, path, out var res), path); return(res); } }
public static Cursor GetCursorFromFormId(uint form) { lock (XEditLibWrapper.LockObject) { ThrowOnError(XEditLibWrapper.GetRecord(0, form, true, out uint record)); XEditLibWrapper.GetElement(record, "Record Header\\FormID", out ElementHandle elementHandle); using var handle = GetElementFile(elementHandle); var pos = GetFileLoadOrder(handle); return(new Cursor((uint)pos, form)); } }