+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Feb 2009
    Posts
    18

    Default AutoCAD 2012 user library in lisp

    Registered forum members do not see this ad.

    Hello everybody.
    We have a custom lisp that worked fine in Acad2000. Now we are using the 2012 version of acad and the lisp is not working anymore. The reason is the user material library.

    The old lisp:
    We had a material library like for woods and metals. When the user selected for example the birch wood, the lisp changed the selected objects color to a specific color like 40 and gave the object the birch texture (jpg, from texture library).

    Now for some reasons the new autocad doesnt like to work in this way.

    So my question is: is there any way to add color and material to selected object from the user library by one click?

    I know that this can be done step by step manually, but there is the risk that some user will attach wrong materials.

    Thanks for helping.

  2. #2
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,000

    Default

    I believe you are referring to textures for rendering. In previous versions of AutoCAD it was possible to associate material textures with layers or colors and transfer it this way to objects. The render module was changed significantly in new versions, so I'm not sure that this association method is still supported. Most probably you will need to re-write the routine.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  3. #3
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Feb 2009
    Posts
    18

    Default

    Registered forum members do not see this ad.

    Thanks MSasu for the reply,
    I did try to re-write it but just can figure out how.
    If i do it manually then its ok. I activate the object, open the material browser, select a material from user library, the selected material jumps to Document library, right click from the material and assign to selected.
    This is what im trying to make automatic.

    If i use chprop and select change material and type in the name of the material, AutoCAD cant locate it as its not searching from the user material library even when its loaded

    Just dont know how to call the material by name from an other library.

Similar Threads

  1. Lisp for AutoCAD 2012
    By jmkona in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 13th Jun 2012, 09:52 pm
  2. Replies: 0
    Last Post: 17th Sep 2011, 03:38 pm
  3. Autodesk 2012 Medium Rez Image Library
    By Autodesk in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 24th Mar 2011, 06:30 pm
  4. Replies: 0
    Last Post: 24th Mar 2011, 06:30 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts