See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: custom linetypes in tool palettes

  1. #1
    100 Club tlewald's Avatar
    Join Date
    2003-01
    Location
    USA
    Posts
    144
    Login to Give a bone
    0

    Unhappy custom linetypes in tool palettes

    Hello,

    I could really use some help solving this problem.

    I have created several custom linetypes to represent storm, sanitary , water, etc. I have put them as polylines on my tool palette and customized them to draw the desired linetype and on the desired layer. The problem, is that as soon as i use one of my custom linetypes, every custom linetype I pick from the palette looks like the 1st one.

    It's really strange considering the create linetype layer and linetype definition loads in the layer manager, although the newly created entities continue to behave with the 1st used entity no matter what you do to it, although using the polylines from the tool palette with standard linetypes work fine.

    Please help!

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: custom linetypes in tool palettes

    What version of AutoCAD and what SP level?
    R.K. McSwain | CAD Panacea |

  3. #3
    100 Club tlewald's Avatar
    Join Date
    2003-01
    Location
    USA
    Posts
    144
    Login to Give a bone
    0

    Default Re: custom linetypes in tool palettes

    Sorry I failed to mention that.

    Civil3D 2009 SP2.

    Although I tried it in several younger versions of vanilla 'acad, civil3d and LDD and have the same issue.
    Last edited by tlewald; 2009-01-06 at 07:40 PM.

  4. #4
    AUGI Addict jpaulsen's Avatar
    Join Date
    2002-04
    Location
    Colorado
    Posts
    2,020
    Login to Give a bone
    0

    Default Re: custom linetypes in tool palettes

    I assume you mean SP1 (version 2) because SP2 is not released yet.

    I just tried it in C3D 2009 SP1 and it works fine. I created two polylines. Assigned a linetype to each then dragged them onto a tool palette.

    How are you creating the tools. What do the tool properties look like? Are you accidentally setting the same linetype in the tool property and expecting the linetype to change with the layer?

  5. #5
    100 Club tlewald's Avatar
    Join Date
    2003-01
    Location
    USA
    Posts
    144
    Login to Give a bone
    0

    Unhappy Re: custom linetypes in tool palettes

    Thanks for the reply jpaulsen.

    Sure, SP1, regardless it doesn't work.

    It works when you use them in the drawing they were created, but if you use them in a new blank drawing they do not work.

    Mind you this is also using custom linetypes, in my case the custom linetypes have shx components.

    I've tried it on several workstations with varying configurations and it doesn't work on any of them.

  6. #6
    AUGI Addict jpaulsen's Avatar
    Join Date
    2002-04
    Location
    Colorado
    Posts
    2,020
    Login to Give a bone
    0

    Default Re: custom linetypes in tool palettes

    Quote Originally Posted by jpaulsen View Post
    How are you creating the tools. What do the tool properties look like? Are you accidentally setting the same linetype in the tool property and expecting the linetype to change with the layer?
    I may be able to help if you can answer these questions.

  7. #7
    100 Club tlewald's Avatar
    Join Date
    2003-01
    Location
    USA
    Posts
    144
    Login to Give a bone
    0

    Unhappy Re: custom linetypes in tool palettes

    Quote Originally Posted by jpaulsen View Post
    I may be able to help if you can answer these questions.
    Thanks again for the reply and I appreciate the offer for assistance, although it doesn't seem like it's along the right tracks.

    The tool palette was created by right-clicking the object and copy-n-pastin'. See the attached screen capture for the properties of the line.

    Everything works great in the when you use it in the drawing it was created, although it does not function properly when you try it in a blank drawing where the linetype has not been loaded.

    As a work-a-round, I added the following LISP to my acad2009doc.lsp:

    (setvar "Expert" 3)
    (command "._linetype" "_load" "*" "mylinetypes.lin" "")
    (setvar "Expert" 0)
    (princ)

    to load the linetypes into every drawing, although this is not the ideal way fix to the problem, but it does solve the problem.

    It's definitely not just me either, everyone has this problem, it's something with Autocad.
    Attached Images Attached Images
    Last edited by tlewald; 2009-01-12 at 08:24 PM.

  8. #8
    AUGI Addict jpaulsen's Avatar
    Join Date
    2002-04
    Location
    Colorado
    Posts
    2,020
    Login to Give a bone
    0

    Default Re: custom linetypes in tool palettes

    As far as I know AutoCAD only loads linetypes in the ACAD.LIN file automatically. If you want to load a linetype file with a different name you will need to do load it using lisp similar to what you have done. I would recommend creating an ACADDOC.LSP file instead of using the ACAD2009DOC.LSP. You will have less chance of losing your custom code during a reinstall.

    Alternatively you could add your custom linetype definitions to the ACAD.LIN file in the search path. This is the way we have ours setup at my company.

    You can verify which line file is being used by AutoCAD by typing the following at the command prompt:
    Code:
     
    (findfile "acad.lin")

  9. #9
    100 Club tlewald's Avatar
    Join Date
    2003-01
    Location
    USA
    Posts
    144
    Login to Give a bone
    0

    Unhappy Re: custom linetypes in tool palettes

    Quote Originally Posted by jpaulsen View Post
    As far as I know AutoCAD only loads linetypes in the ACAD.LIN file automatically. If you want to load a linetype file with a different name you will need to do load it using lisp similar to what you have done. I would recommend creating an ACADDOC.LSP file instead of using the ACAD2009DOC.LSP. You will have less chance of losing your custom code during a reinstall.

    Alternatively you could add your custom linetype definitions to the ACAD.LIN file in the search path. This is the way we have ours setup at my company.

    You can verify which line file is being used by AutoCAD by typing the following at the command prompt:
    Code:
     
    (findfile "acad.lin")
    Thanks again Jeff, although this is not the ideal way to solve the problem. Having to load the linetypes in every drawing vs having them load "on-demand" when selected from the tool palette.

    There's gotta be a better way!

  10. #10
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    1

    Default Re: custom linetypes in tool palettes

    Quote Originally Posted by jpaulsen View Post
    As far as I know AutoCAD only loads linetypes in the ACAD.LIN file automatically.
    Not exactly. AutoCAD doesn't load any linetypes automatically.

    Quote Originally Posted by jpaulsen
    I would recommend creating an ACADDOC.LSP file instead of using the ACAD2009DOC.LSP. You will have less chance of losing your custom code during a reinstall.
    Correct, do not use acad20xxdoc.lsp.

    Quote Originally Posted by jpaulsen
    Alternatively you could add your custom linetype definitions to the ACAD.LIN file in the search path. This is the way we have ours setup at my company.

    You can verify which line file is being used by AutoCAD by typing the following at the command prompt:
    Code:
     
    (findfile "acad.lin")
    Going back to the first point, AutoCAD does not load any linetypes automatically, and the only thing accomplished by having one or more .LIN files in the support file search path, is that this is what appears as a default when loading them using the ._LINETYPE command.

    You could put any number of .LIN files anywhere and load them at anytime without them being in the support file search path, so technically doing the (findfile) thing doesn't really tell you anything.

    Furthermore, remember that linetype definitions are stored in the drawing, it's very possible that a linetype in a drawing may not match a linetype stored in "Acad.lin" (or any other file), even if they have the same name. I see this periodically when a linetype looks wrong even though it has the correct name, and it turns out it was loaded from a different file.
    R.K. McSwain | CAD Panacea |

Page 1 of 2 12 LastLast

Similar Threads

  1. 2014: Export custom tool palettes
    By jpcadconsulting347236 in forum ACA General
    Replies: 1
    Last Post: 2014-04-24, 10:36 PM
  2. How custom tool button images are created for tool palettes
    By Mike.Perry in forum AutoCAD Tips & Tricks
    Replies: 6
    Last Post: 2012-10-09, 02:44 PM
  3. Custom Schematic Styles into Custom Tool Palettes
    By paul_mep in forum AMEP General
    Replies: 5
    Last Post: 2008-02-08, 04:53 AM
  4. custom tool palettes
    By Heather_W in forum ACA General
    Replies: 4
    Last Post: 2007-09-24, 01:45 PM

Posting Permissions

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