CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor and other Autodesk products []
Cesky English Deutsch
 Visitors: 4264 

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)
100% *  CAD 
21.4.2016    1030x  
Comments   Tell a friend
applies to: Inventor ·

See also:
Tip 10889:How to get user's full domain name, phone No., department, e-mail...
Tip 9952:iLogic rule - check whether iProperties are overridden.
Tip 9692:Unfoldable spiral-helix sheet metal in Inventor.
Tip 9477:Saving a DWG copy of an IDW drawing named by revision number.
Tip 9340:Using iLogic to parse IPT filename and populate iProperties.

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   

Add .CIT raster format support to AutoCAD and Map and Civil 3D
CITin 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.