CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
Cesky English Deutsch
Login/Register:
 Visitors: 5541 

CAD tip CAD tip # 10852:

Question CAD 
 %  platform  category 
Q - question

iLogic - how to get part material and path from a drawing?

A - answer If you need - in Inventor drawing environment - to process (e.g. convert to uppercase) and display (e.g. in the title block) the material name and file name or path of the source IPT part, you can use the following fragment of an iLogic rule - it creates two custom iProperties with the requested values:

modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName) 'or GetFullPath  
iProperties.Value("Custom", "MyPartMaterial") = UCase(iProperties.Material(modelName))  
iProperties.Value("Custom", "MyPartFile") = UCase(modelName)
Inventor
100% *  CAD 
21.4.2016    2370×  
Comments   Tell a friend
applies to: Inventor ·

See also:
Tip 11801:What is the difference between ThisDoc.Document and ThisApplication.ActiveDocument in iLogic?
Tip 11732:How to sort BOM or parts list by part number in Inventor? (iLogic)
Tip 11244:Labels with incrementing numbers - assembly with numbered labels for laser cutting.
Tip 11211:Mass change of units in the whole Inventor assembly.
Tip 9952:iLogic rule - check whether iProperties are overridden.


Back   All CAD Tips All CAD tips&tricks

Dynamic linetype scaling by mouse dragging. « | » GeoCode with what3words location codes.

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:
Track your time spent working on AutoCAD or Revit jobs - automatically with
CADstudio JobTime More info


Please use these tips at your own risk.
CAD Studio (Xanadu) is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist