Help Transaction didn't do any thing

Help Transaction didn't do any thing

ahmed_ramadan2262
Explorer Explorer
478 Views
4 Replies
Message 1 of 5

Help Transaction didn't do any thing

ahmed_ramadan2262
Explorer
Explorer

Hi ,

I get list of elements Ids  thin I make Isolation and it's  work ,But when I Exit From The Add-in The Isolation or any Changes Disappeared 

What is The Problem

and Thx.

List<ElementId> Ids= new<ElementId>; 

using (Transaction ss = new Transaction(Doc))
{
try
{
ss.Start("Start");
List<Element> elements = CategoryFilter();
foreach (Element Elem in elements)
{

Ids.Add(Elem.Id);
}
UiDoc.ActiveView.IsolateElementsTemporary(ids);
ss.Commit();
}
catch
{
ss.RollBack();
}
}

0 Likes
Accepted solutions (1)
479 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

Strange problem. Have you looked at other threads here concerning the IsolateElementsTemporary method?

  

  

Nobody else is reporting any problem, and all of them seem to be using it successfully with no issues.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 5

ahmed_ramadan2262
Explorer
Explorer

Yes I Have  But the problem in Transaction  whin I Exit from the addin the Transaction  close and didn't make any changes

 

0 Likes
Message 4 of 5

RPTHOMAS108
Mentor
Mentor

What result do you return from IExternalCommand?

0 Likes
Message 5 of 5

ahmed_ramadan2262
Explorer
Explorer
Accepted solution
0 Likes