Transaction not end

Transaction not end

bradeneuropeArthur
Mentor Mentor
150 Views
4 Replies
Message 1 of 5

Transaction not end

bradeneuropeArthur
Mentor
Mentor

Hi,

 

I have an active sketch in edit (working in a 2d sketch active and open)

 

When I run this command in this active sketch:

Dim trm As TransactionManager = g_inventorApplication.TransactionManager
Dim tr1 As Transaction = trm.StartTransaction(g_inventorApplication.ActiveEditDocument, "MdlSketchPointsAdd.BySketchLines")

Dim ssl As Inventor.SketchLine = g_inventorApplication.CommandManager.Pick(Inventor.SelectionFilterEnum.kSketchCurveLinearFilter, "Pick One Sketchline 2D")

tr1.End()

 

When I in between this command press "ESC" or "FINISH SKETCH" or "END SKETCH" the transaction seems not to end and the sketch is not closed or end.

 

What is the reason for that?

 @johnsonshiue @CGBenner @JelteDeJong  any idea (within your team)

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

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

mat_hijs
Collaborator
Collaborator

When I press escape or finish the sketch it seems to end the transaction correctly. When I cancel the sketch it throws an error. I tested this in iLogic, I'm not sure if that would make a difference.

0 Likes
Message 3 of 5

bradeneuropeArthur
Mentor
Mentor

That is the same as I see indeed.

Thanks for confirming 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 4 of 5

bradeneuropeArthur
Mentor
Mentor

@johnsonshiue could this be a bug in the API?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 5

bradeneuropeArthur
Mentor
Mentor
Accepted solution

Solved with this check:

 

Dim ssl As Inventor.SketchLine = ThisApplication.CommandManager.Pick(Inventor.SelectionFilterEnum.kSketchCurveLinearFilter, "Pick One Sketchline 2D")

If not ssl is Nothing
Dim trm As TransactionManager = ThisApplication.TransactionManager
Dim tr1 As Transaction = trm.StartTransaction(ThisApplication.ActiveEditDocument, "MdlSketchPointsAdd.BySketchLines")

tr1.End()

End If

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes