Donald Haxhiu Work
Guest
Beautiful. works wonderfully. Thank you so much mente
sub runrule()
dim ilogicaddin as inventor.applicationaddin
dim odoc as inventor.assemblydocument
dim ailogic as object
if thisapplication.activedocumenttype = kassemblydocumentobject then
set odoc = thisapplication.activedocument
set ilogicaddin = thisapplication.applicationaddins.itembyid("{3bdd8d79-2179-4b11-8a5a-257b1c0263ac}")
set ailogic = ilogicaddin.automation
' parametri = documento attivo, nome regole ilogic
call ailogic.runexternalrule(odoc, "readonlyfiles")
end if
end sub
@dsw:to set a shortcut key, the easiest and fastest method is to use a vba code like the following:
the code must be inserted into a project module of the application, and then the shortcut key should be associated with the macro vbaCode:sub runrule() dim ilogicaddin as inventor.applicationaddin dim odoc as inventor.assemblydocument dim ailogic as object if thisapplication.activedocumenttype = kassemblydocumentobject then set odoc = thisapplication.activedocument set ilogicaddin = thisapplication.applicationaddins.itembyid("{3bdd8d79-2179-4b11-8a5a-257b1c0263ac}") set ailogic = ilogicaddin.automation ' parametri = documento attivo, nome regole ilogic call ailogic.runexternalrule(odoc, "readonlyfiles") end if end sub
some references