Add Material To The Material Library Using VBA

Add Material To The Material Library Using VBA

isocam
Collaborator Collaborator
194 Views
1 Reply
Message 1 of 2

Add Material To The Material Library Using VBA

isocam
Collaborator
Collaborator

Can anybody help?

 

This might be a silly question but....

 

Is it possible to add a new material to the material library using a VBA macro?

 

Many thanks in advance!

 

Darren

0 Likes
195 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @isocam.  The short answer is yes.  The Assets object you get under the AssemblyDocument & PartDocument objects (PartDocument.Assets) supports an Add() method for creating a new Asset.  Then the new Asset object that you create has a CopyTo() method, which lets you copy this new Asset to an AssetLibrary, AssetCatagory, or Document object.  Is that enough info, or do you need the whole VBA macro too?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes