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: 7297
Plex.Earth connects AutoCAD and Google Earth

CAD tip CAD tip # 14174:

   
Question CAD 
 %  platform  category 
Q - question

Create or modify a part reference (AMPartRef) from AutoLISP.

A - answer In AutoCAD Mechanical, you can create and modify (name, properties, material, etc.) objects of the Part Reference (AMPARTREF) type using the commands AMPARTREF and AMPARTREFEDIT. However, if you need to create or modify such an object programmatically or by script or from a menu, it is not easy.

That's why we in ARKANCE have prepared a sample LISP with functions for creating a sample part reference (AddPartRef), listing reference data (ListPartRefData), and changing data of such drawing objects - either interactively (changePartRefData) or in your own application.

You can download the complete LISP file ChangePartRef.lsp from Download and load it with APPLOAD.

ACADM
100% *  CAD 
11.7.2024    520×  
Prices - CAD eShop:
applies to: AutoCAD Mechanical ·

See also:
Tip 13855:DBXscanLayers and DBXscanBlocks - bulk report content of DWG files in a folder.
Tip 13824:How to export OBJ including materials, textures from Inventor?
Tip 13452:HideItem - hiding individual items in AutoCAD arrays or attributes
Tip 13404:How to import an IFC file in AutoCAD?
Tip 13227:Reference Explorer - quick analysis of your project or assembly (file size, xref errors).


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:
Simply link AutoCAD LT blocks to Excel table data.
Excellink LT 2006 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