CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 10217

CAD tip CAD tip # 13920:

   
Question CAD 
 %  platform  category 
Q - question

Saving your Inventor model in the presentation color scheme (iLogic).

A - answer If you want to occasionally save your 3D models of parts and assemblies from Inventor with thumbnail previews in a uniform presentation style, or even with a special corporate background, you can use the following iLogic macro, rule. It will help, for example, when creating a uniform parts library.

The macro for this special saving needs to be defined as external to be available in all documents (models). You can assign its invocation to an icon in the ribbon (e.g. "Save in presentation mode") using the functions in the T4I bonus application. You can then use it instead of standard Save whenever you want to save a "nicer" file.

Simpler version of iLogic macro with temporary schema switching before saving:

'Save in preset color scheme
Sub Main()
CurrentColorScheme = ThisApplication.ActiveColorScheme.Name
ThisApplication.ColorSchemes.Item("Presentation").Activate
Call ThisApplication.CommandManager.ControlDefinitions.Item("AppFileSaveCmd").Execute
ThisApplication.ColorSchemes.Item(CurrentColorScheme).Activate
End Sub

Or a variant, slightly more complex version, with a forced change of the background image:

'Save in preset color scheme (bkg)
Sub Main()
Dim CurrentBackground As String = ""
CurrentColorScheme = ThisApplication.ActiveColorScheme.Name
ThisApplication.ColorSchemes.Item("Presentation").Activate
If ThisApplication.ColorSchemes.BackgroundType = kImageBackgroundType
	CurrentBackground = ThisApplication.ActiveColorScheme.ImageFullFileName
	ThisApplication.ActiveColorScheme.ImageFullFileName = "c:\Users\USERNAME\bkg\FIRMA-8d2d0b3.png"
End If
Call ThisApplication.CommandManager.ControlDefinitions.Item("AppFileSaveCmd").Execute
If CurrentBackground>"" Then
	ThisApplication.ActiveColorScheme.ImageFullFileName = CurrentBackground
End If
ThisApplication.ColorSchemes.Item(CurrentColorScheme).Activate
End Sub

In another Inventor localization, you will need to use the local name for the Presentation scheme, e.g. "Präsentation" in German.

Inventor
100% *  CAD 
11.11.2023    26444×  
Prices - CAD eShop:
applies to: Inventor ·

See also:
Tip 13965:Total length of sweeps in Inventor - wires, pipes, trusses, tubes, hoses (iLogic)
Tip 13963:Sum of pipe element lengths in Inventor (iLogic).
Tip 13911:How to print all sheets at once from Inventor?
Tip 13884:How to send e-mails with an iLogic macro?
Tip 13852:How to bulk-update all model parameters?


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Link your AutoCAD block attributes with Excel tables/sheets. Automatically. Dynamically. Bidirectionally.
Try Excellink 2015 More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist