Results 1 to 3 of 3

Thread: Script Problem

  1. #1
    Member
    Join Date
    2010-09
    Posts
    2
    Login to Give a bone
    0

    Default Script Problem

    I have a script for loading map cells to create a large base map. It works fine for about 8 cells and then the -insert command starts asking for both X and Y scales. It seems to do this with any drawing that loads after the the 8th one. I have checked the first 8 cells and none of them contain any other cell as a block which is the only thing I coould think of that might cause this to happen. Can anyone help?

    Thanks.

    Here is the script up until the point it crashes:

    filedia
    0
    insunitsdefsource
    0
    insunitsdeftarget
    0
    -LAYER
    s
    0

    -Insert
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B02.dwg
    0,0,0
    1
    0
    -Insert
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B03.dwg
    0,0,0
    1
    0
    -Insert
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B04.dwg
    0,0,0
    1
    0
    -Insert
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B05.dwg
    0,0,0
    1
    0
    -Insert
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B06.dwg
    0,0,0
    1
    0
    -Insert
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B07.dwg
    0,0,0
    1
    0
    -Insert
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B08.dwg
    0,0,0
    1
    0
    -Insert
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B09.dwg
    0,0,0
    1
    0
    -Insert
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B10.dwg
    0,0,0
    1
    0

    And here is the result of running the script:


    Command: '_script
    Command: filedia

    Enter new value for FILEDIA <1>: 0

    Command: insunitsdefsource

    Enter new value for INSUNITSDEFSOURCE <0>: 0

    Command: insunitsdeftarget

    Enter new value for INSUNITSDEFTARGET <0>: 0

    Command: -LAYER

    Current layer: "0"
    Enter an option
    [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck
    /Unlock/stAte/Description/rEconcile]: s

    Enter layer name to make current or <select object>: 0
    Enter an option
    [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck
    /Unlock/stAte/Description/rEconcile]:

    Command: -Insert
    Enter block name or [?]: K:\Fac\Mapping-Current\Map_Cells\B_Cells\B02.dwg

    Units: Feet Conversion: 1'-0"
    Specify insertion point or [Basepoint/Scale/Rotate]: 0,0,0
    Specify scale factor <1>: 1

    Specify rotation angle <0>: 0

    Command: -Insert
    Enter block name or [?] <B02>:
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B03.dwg

    Units: Feet Conversion: 1'-0"
    Specify insertion point or [Basepoint/Scale/Rotate]: 0,0,0
    Specify scale factor <1>: 1

    Specify rotation angle <0>: 0

    Command: -Insert
    Enter block name or [?] <B03>:
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B04.dwg

    Units: Feet Conversion: 1'-0"
    Specify insertion point or [Basepoint/Scale/Rotate]: 0,0,0
    Specify scale factor <1>: 1

    Specify rotation angle <0>: 0

    Command: -Insert
    Enter block name or [?] <B04>:
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B05.dwg

    Units: Feet Conversion: 1'-0"
    Specify insertion point or [Basepoint/Scale/Rotate]: 0,0,0
    Specify scale factor <1>: 1

    Specify rotation angle <0>: 0

    Command: -Insert
    Enter block name or [?] <B05>:
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B06.dwg

    Units: Feet Conversion: 1'-0"
    Specify insertion point or [Basepoint/Scale/Rotate]: 0,0,0
    Specify scale factor <1>: 1

    Specify rotation angle <0>: 0

    Command: -Insert
    Enter block name or [?] <B06>:
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B07.dwg

    Units: Feet Conversion: 1'-0"
    Specify insertion point or [Basepoint/Scale/Rotate]: 0,0,0
    Specify scale factor <1>: 1

    Specify rotation angle <0>: 0

    Command: -Insert
    Enter block name or [?] <B07>:
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B08.dwg

    Units: Feet Conversion: 1'-0"
    Specify insertion point or [Basepoint/Scale/Rotate]: 0,0,0
    Specify scale factor <1>: 1

    Specify rotation angle <0>: 0

    Command: -Insert
    Enter block name or [?] <B08>:
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B09.dwg

    Units: Feet Conversion: 1'-0"
    Specify insertion point or [Basepoint/Scale/Rotate]: 0,0,0
    Specify scale factor <1>: 1

    Specify rotation angle <0>: 0

    Command: -Insert
    Enter block name or [?] <B09>:
    K:\Fac\Mapping-Current\Map_Cells\B_Cells\B10.dwg

    Units: Feet Conversion: 1'-0"
    Specify insertion point or [Basepoint/Scale/X/Y/Z/Rotate]: 0,0,0

    Enter X scale factor, specify opposite corner, or [Corner/XYZ] <1>: 1
    Enter Y scale factor <use X scale factor>: 0

    Value must be nonzero.
    Enter Y scale factor <use X scale factor>: *Cancel*

  2. #2
    Member
    Join Date
    2010-09
    Posts
    2
    Login to Give a bone
    0

    Default Re: Script Problem

    OK, so I've figure out that the problem cells are coming in as blocks that allow non-uniform scaling. Now my question is: What do I do to a .dwg file to make sure it inserts into another drawing as a uniformly scaled block?

    Thanks!

  3. #3
    Woo! Hoo! my 1st post
    Join Date
    2015-10
    Posts
    1
    Login to Give a bone
    0

    Default Re: Script Problem

    How did you get the X, Y and Z scale factors not to come for the other blocks? I don't recall any system variable to do that. I looked it up in the online docs but there does not seem to be a sysvar that toggles betwen asking for a single scale value and x and y values. The only way to ask for that seems to be the Uniform scale checkbox on the insert dialog box.Is the INSUNITS value for your drawing also 1?

Similar Threads

  1. Problem With Script
    By CADdancer in forum AutoLISP
    Replies: 5
    Last Post: 2013-08-07, 09:54 PM
  2. Script pro
    By plarson.118418 in forum AMEP General
    Replies: 5
    Last Post: 2008-12-18, 07:30 PM
  3. Script Pro Problem
    By Anthony Rhodes in forum AutoCAD General
    Replies: 9
    Last Post: 2008-11-24, 06:03 PM
  4. Applying Script To Multiple layouts problem?
    By pierredib in forum AutoCAD General
    Replies: 1
    Last Post: 2008-08-13, 01:08 PM
  5. Multiple script problem
    By DAVIDALLIN in forum AutoCAD General
    Replies: 2
    Last Post: 2004-12-01, 05:48 AM

Posting Permissions

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