乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 48|回复: 3

[编程交流] LISP Materials (textures, shad

[复制链接]

7

主题

29

帖子

22

银币

初来乍到

Rank: 1

铜币
35
发表于 2022-7-5 18:18:11 | 显示全部楼层 |阅读模式
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.
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-5 18:52:28 | 显示全部楼层
Hi,
 
The materials that is inserted into current drawing as a collection :
 
  1. (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:
 
  1. (vla-put-material  )
 
I didn't work with materials with Lisp before but with some tests I come up with the above.
回复

使用道具 举报

7

主题

29

帖子

22

银币

初来乍到

Rank: 1

铜币
35
发表于 2022-7-5 19:01:13 | 显示全部楼层
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?
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-5 19:35:23 | 显示全部楼层
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?
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-12 20:00 , Processed in 1.012752 second(s), 60 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表