Zobrazit plnou verzi příspěvku: Otváranie .ipt (.iam)

mimo0912
27.10.2008, 17:07
Pozdravujem,potreboval by som poradiť, či sa dá v Inventore 11 pri otváraní súboru súčiastky alebo zostavy spustiť makro.  Ďakujem

flesar
27.10.2008, 19:04
Podle nápovědy pro AIP2008 by to mělo jít zařídit.Automatic Macros
Automatic macros are macros that are automatically run when certain events
happen within Autodesk Inventor. An automatic macro is like any other macro
except for its name. To create an automatic macro just name a macro so it
contains any of the automatic macro names. Depending on the name of the macro,
it will be automatically run by Autodesk Inventor if the associated event
occurs. Automatic macros are only supported within document projects. Macros
within the Application or a User Project that use the names below will be
ignored as far as running automatically.
Inventor identifies automatic macros by their names. For example the name for
the macro that will run automatically when the document is opened is "AutoOpen."
Autodesk Inventor allows some flexibility in this naming by only requiring the
string to be part of the macro name. For example, the following macro names will
be considered auto-open macros: AutoOpen1, AutoOpen2, NewAutoOpen, autoopen3, or
TestAutoOpen4. From these examples you can see that additional characters can
precede or be appended to the auto macro name. In addition, it is not
case-sensitive. Because of this flexibility you can create multiple automatic
macros for a single event. If there are multiple macros for an event, their
order of execution is arbitrary.
Autodesk Inventor runs automatic macros automatically whenever the associated
events occur. If the user presses the Shift key when the event occurs, the
automatic macro will not run. For example, if the user presses the Shift key
while opening a document that contains an AutoOpen macro, the macro will not
run.
AutoOpen
This macro is run automatically when the document it is contained within is
opened.
AutoNew
This macro is run automatically when a new document is created from a
template. For this macro to be used, it must exist within the template file.
AutoSave
This macro is run automatically whenever the document it is contained within
is saved.
AutoClose
This macro is run automatically whenever the document it is contained within
is closed.
AutoEdit
This macro is run when parts/sub-assemblies are opened or edited.

mimo0912
29.10.2008, 06:02
Tento HELP je aj v 11, ale neviem to spracovať do Makra. Taktiež musím sa verejne priznať, že moja angličtina nie je až taká dobrá, takže v tom texte sa trošku zamotávam. Ale každé makro má základný tvarSub NazovMakra() .........End Subpritom, tam to tak nie je. Uvažoval som aj, že to môže byť niejaká udalosť, ale neviem. Ak má niekto s týmto skúsenosť a chcel by poradiť, budem veľmi rád.

Charlee
29.10.2008, 06:22
Mám to vyzkoušené že to funguje ve ver 11 a 2008. Makro musí být součástí souboru při jehož otevření se má spustit. Musí se jmenovat AutoOpen případne ještě něco za.

Vladimír Michl
29.10.2008, 11:10
Ano, podstatné je to uložení makra přímo v dokumentu. Lze to řešit i přes "nadstavbová" makra, ale to je složitější.

mimo0912
31.10.2008, 07:16
Vďaka, funguje to už aj mne. Fungovalo to aj predtým, ale príkaz v makre, ktorý sa mal vykonať som zrušil ďalším príkazom, takže ono to prebehlo, ale po načítaní dokumentu sa to neprejavilo. Tak ešte raz, ďakujem.