Apache2k Posted December 8, 2015 Posted December 8, 2015 I have been trying to find some sources how to handle materials via LISP but it seems to be impossible to get anything out. Is it so that Lisp cant handle the material library? I have a custom material library containing materials that i want to attach to the selected block. Not to layer. vla-put-material seems to be an option but don't know how to use it. Any help is welcome. Quote
Tharwat Posted December 8, 2015 Posted December 8, 2015 Hi, The materials that is inserted into current drawing as a collection : (vla-get-materials (vla-get-activedocument (vlax-get-acad-object))) and to assign materials to 3D objects, the material object name should be an item in the collection to be able to add it to any object with the function: (vla-put-material <vla-object> <Name_of_material>) I didn't work with materials with Lisp before but with some tests I come up with the above. Quote
Apache2k Posted December 8, 2015 Author Posted December 8, 2015 Thank you Tharwat, but i have to say that i still don't get this :) To i have to move my custom material from my material library first to the document material library? and can dis be done via LISP or VLA? Quote
Tharwat Posted December 8, 2015 Posted December 8, 2015 I think yes it is possible and we can try that since we would loss nothing We can create a temporary 3D object and assign the materials that you want to use to it , then delete the temporary object so the materials would be available in current drawing. Upload a few material to see the type of these files. What do you think? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.