Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am having an issue with starting a transaction.
In the code Below:
1- m_document IS modifiable.
2- New transaction code completes, and checking its status returns "Uninitialized"... not sure what to expect here.
3- I never get through the "loadFamilies.Start". my macro quits silently. I was expecting to at least execute one of its if-else dialogs.
So, I am trying to understand why i cannot execute ".Start" if the document is modifiable, and whether "uninitialized" means anything here.... how do i debug this?
if (m_document.IsModifiable)
{
TaskDialog.Show("RtPrfBldr", "Document is modifiable");
}
Transaction loadFamilies = new Transaction(m_document, "Load Families");
TaskDialog.Show("RtPrfBldr", "loadFamilies GetStatus: " + loadFamilies.GetStatus().ToString());
if (loadFamilies.Start() != TransactionStatus.Started)
{
TaskDialog.Show("RtPrfBldr", "Started trx = " + loadFamilies.GetStatus().ToString());
}
else
{
TaskDialog.Show("RtPrfBldr", "Could not Start trx:" + loadFamilies.GetStatus().ToString());
}
Solved! Go to Solution.