Results 1 to 3 of 3

Thread: Create a Layer based on DimScale variable

  1. #1
    Certifiable AUGI Addict dhurtubise's Avatar
    Join Date
    2005-07
    Location
    Somewhere in the BIM world
    Posts
    3,792
    Login to Give a bone
    0

    Default Create a Layer based on DimScale variable

    Here's the deal.
    I need to create a layer based on the dimscale variable.
    So basically here's my needed process:
    1 - Get the dimscale value (getvar "dimscale")
    2 - Concatonate that value to 2 digit (getvar returns ie 48.0)
    3 - Create a layer (DIM-XXX-NeededValue)

    IE :
    1 - dimscale = 48.0
    2 - variable value = 48
    3 - Layer = DIM-XXX-48
    4 - Make that layer current

    Any ideas ?

  2. #2
    AUGI Addict Glenn Pope's Avatar
    Join Date
    2001-05
    Location
    Austin, TX USA
    Posts
    2,201
    Login to Give a bone
    0

    Default Re: Create a Layer based on DimScale variable

    Code:
    (command "layer" "make" (strcat "DIM-XXXX-" (rtos (getvar "dimscale") 2 0)))

  3. #3
    Certifiable AUGI Addict dhurtubise's Avatar
    Join Date
    2005-07
    Location
    Somewhere in the BIM world
    Posts
    3,792
    Login to Give a bone
    0

    Default Re: Create a Layer based on DimScale variable

    (command "dimscale" pause "layer" "make" (strcat "0LM-XXX-DIM-PLC-" (rtos (getvar "dimscale") 2 0)) "color" "red" "" "")

    Perfect for me
    Thaks
    Last edited by dhurtubise; 2005-12-08 at 07:36 PM.

Similar Threads

  1. Replies: 10
    Last Post: 2012-04-11, 06:02 PM
  2. Size Attribute depending on the DIMSCALE variable?
    By Dave F. in forum Dynamic Blocks - Technical
    Replies: 3
    Last Post: 2008-05-30, 09:06 PM
  3. Dimscale variable resets on paste
    By timothyjturner in forum AutoLISP
    Replies: 14
    Last Post: 2007-08-03, 02:19 PM
  4. Is there a way to create a layer based off of queryed options?
    By bmonk in forum AutoCAD Map 3D - General
    Replies: 2
    Last Post: 2007-03-27, 05:47 PM
  5. DIMSCALE System Variable - How does it work
    By SRBalliet in forum AutoCAD General
    Replies: 1
    Last Post: 2006-01-31, 04:12 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
  •