Save as in macro works, save as it does not work in ilogic

Save as in macro works, save as it does not work in ilogic

Sergio.D.Suárez
Mentor Mentor
608 Views
4 Replies
Message 1 of 5

Save as in macro works, save as it does not work in ilogic

Sergio.D.Suárez
Mentor
Mentor

Hi everybody, i have a doubt,
Because this routine in macro works perfectly and this routine in ilogic does not perform any action?

 

MACRO

Sub RunCommand()
    ' Get the CommandManager object.
    Dim oCommandMgr As CommandManager
    Set oCommandMgr = ThisApplication.CommandManager

    ' Get control definition for the line command.
    Dim oControlDef As ControlDefinition
    Set oControlDef = oCommandMgr.ControlDefinitions.Item("AppFileSaveAsCmd")
    ' Execute the command.
    Call oControlDef.Execute
End Sub

 

ILOGIC

    ' Get the CommandManager object.
    Dim oCommandMgr As CommandManager
    oCommandMgr = ThisApplication.CommandManager

    ' Get control definition for the line command.
    Dim oControlDef As ControlDefinition
    oControlDef = oCommandMgr.ControlDefinitions.Item("AppFileSaveAsCmd")
    ' Execute the command.
    Call oControlDef.Execute

 


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

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

bradeneuropeArthur
Mentor
Mentor
Accepted solution

with this it works:

    ' Get the CommandManager object.
    Dim oCommandMgr As CommandManager
    oCommandMgr = ThisApplication.CommandManager

    ' Get control definition for the line command.
    Dim oControlDef As ControlDefinition
    oControlDef = oCommandMgr.ControlDefinitions.Item("AppFileSaveAsCmd")
    ' Execute the command.
	'MsgBox (oControlDef.DisplayName)
    oControlDef.Execute2(False)
	

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

Message 3 of 5

Sergio.D.Suárez
Mentor
Mentor

thank you very much Arthur!!!, you are a genius!!!


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 4 of 5

bradeneuropeArthur
Mentor
Mentor

@Sergio.D.Suárez 

Good to hear that it works now!

Your thanks are appreciated.

 

Regards,

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

walter_diepstraten
Explorer
Explorer
Bedankt
0 Likes