Yes if you make changes, then roll back and make a change that change will clear all previous changes.Also, I think that every time you roll back it also resets the Ctrl+Z behaviour. But I haven't experimented to verify
Thank you for expliciting what clears it, was not clear for me! Indeed it's dumb. Extremely frustratingIt's dumb. It clears every time you switch modes. Edit a part in assembly clears it.
Edit sketch in a part clears it.
Exiting the sketch clears it.
Returning to edit the assembly clears it.
So it is very limited in being helpful only while you stay in a mode.
But other things probably clear it too.
class Program
{
static void Main()
{
IADSession Session;
IAutomationHook Hook;
IADRoot Root;
IADPartSession AdPart;
Hook = (IAutomationHook)Marshal.GetActiveObject("AlibreX.AutomationHook");
Root = (IADRoot)Hook.Root;
Root = (IADRoot)Hook.Root;
Session = Root.TopmostSession;
AdPart = (IADPartSession)Session;
AdPart.StartChanges();
AdPart.StopChanges();
}
}
As mentioned elsewhere Alibre Design began as a browser based multi user CAD. These things are probably due to that, and unnecessary unless Alibre re-introduces multi user ability.Based on how Alibre's API is designed I think this makes sense. Other software have a transaction like system where many operations write to the undo stack across domains. Alibre is heavily session/mode based.
AdPart.StartChanges();
Perhaps undocumented - I don't see these in the API help, so I can't say what they are supposed to do.AdPart.StopChanges();
Yes there aren't any methods for adding or removing entries on the undo/history stack like some software.As mentioned elsewhere Alibre Design began as a browser based multi user CAD. These things are probably due to that, and unnecessary unless Alibre re-introduces multi user ability.
Perhaps undocumented - I don't see these in the API help, so I can't say what they are supposed to do.
AdPart.StartChanges()
# do long process work here
AdPart.StopChanges()
Interesting. So StartChanges is render loop/graphics pipeline related and not undo/history/mode change related?@stepalibre , @NateLiqGrav
Python:AdPart.StartChanges() # do long process work here AdPart.StopChanges()
I've always used these to improve performance of a script - to prevent redraws of a part between the calls.
Similar calls can be made at the Sketch level.
David
You know I thought it was familiar:@stepalibre , @NateLiqGrav
Python:AdPart.StartChanges() # do long process work here AdPart.StopChanges()
I've always used these to improve performance of a script - to prevent redraws of a part between the calls.
Similar calls can be made at the Sketch level.
David
Wow V25 Beta API changes?You know I thought it was familiar:
V25 BETA API Changes
Here is a list of API changes I have found so far in the V25 BETA IADMaterial.getMaterialPropertyValue Method IADDesignProperties.TreatAsPartInBOM Property IADDesignSession.StartChanges Method IADDesignSession.StopChanges Method IADMaterialLibrary Interface and related Methods and Properties...www.alibre.com
But it turns out the API help I'm looking my smart phone are outdated (v22) even though I just downloaded them here:
![]()
Alibre Design Application Programming Interface (API) - Alibre
Alibre Design has a robust API allowing for the creation of fully integrated add-ons leveraging the design and analysis capabilities of Alibre products.www.alibre.com
Signal to session that you are about to make model changes. This will allow the session to wait until all changes are completed before sending model change events.
void StartChanges()
Signal to session that you have finished changing the model so that it can now send consolidated set of model change events.
void StopChanges()