Jump to content

Entering DIM really slows down program - found code that is the issue


Andrew1979

Recommended Posts

I have a program that usually runs fine. However, on an AutoCAD drawing that is 4mb in size of just 2D linework, the program slows to a crawl.

It can take almost 2minutes to do a really basic rectangle (i tested)

 

So I used the animate function in the AutoLISP IDE and have found that when a certain function is called, it just takes forever.

 

The code where this happens is below:

 

(defun dimEuting ()
(command "-dimstyle" "RESTORE" "EUTING"
    "dim"
    "dimsah" "on"
    "dimfxlon" "off"
    "dimtxsty" "Arial"
    "DIMTXT" "3.0"
    "dimasz" "3.0"
    "dimblk" "archtick"
    "dimblk1" "archtick"
    "dimblk2" "archtick"
    "dimtfill" "1"
    "dimldrblk" "."

    "dimdle" "0"
    "dimdli" "2.0"
    "dimexe" "1.0"
    "dimexo" "1.0"
    "dimgap" "1.0"

    "dimscale" "50"
    "dimfxlon" "off"
    
    
    "save" "EUTING" "y" "exit"

    "-dimstyle" "RESTORE" "EUTING"
    "-dimstyle" "a" "all" "")
 )

 

Can anyone see any glaring issues with this piece of code and why in a certain sized drawing this becomes an issue?

Link to comment
Share on other sites

Here you can find variables related to dimension:

Command: SETVAR
Enter variable name or [?] <>: ?
Enter variable(s) to list <*>: dim*
DIMADEC           0
DIMALT            OFF
DIMALTD           2
DIMALTF           25.4000
DIMALTRND         0.0000
DIMALTTD          2
DIMALTTZ          0
DIMALTU           2
DIMALTZ           0
DIMANNO           0                                    (read only)
DIMAPOST          ""
DIMARCSYM         0
DIMASO            ON
DIMASSOC          2
DIMASZ            0.1800
DIMATFIT          3
DIMAUNIT          0
DIMAZIN           0
DIMBLK            ""
DIMBLK1           ""
DIMBLK2           ""
DIMCEN            0.0900
DIMCLRD           0
DIMCLRE           0
DIMCLRT           0
DIMDEC            4
DIMDLE            0.0000
DIMDLI            0.3800
DIMDSEP           "."
DIMEXE            0.1800
DIMEXO            0.0625
DIMFIT            3
DIMFRAC           0
DIMFXL            1.0000
DIMFXLON          OFF
DIMGAP            0.0900
DIMJOGANG         45
DIMJUST           0
DIMLDRBLK         ""
DIMLFAC           1.0000
DIMLIM            OFF
DIMLTEX1          ""
DIMLTEX2          ""
DIMLTYPE          ""
DIMLUNIT          2
DIMLWD            -2
DIMLWE            -2
DIMPOST           ""
DIMRND            0.0000
DIMSAH            OFF
DIMSCALE          1.0000
DIMSD1            OFF
DIMSD2            OFF
DIMSE1            OFF
DIMSE2            OFF
DIMSHO            ON
DIMSOXD           OFF
DIMSTYLE          "Standard"                           (read only)
DIMTAD            0
DIMTDEC           4
DIMTFAC           1.0000
DIMTFILL          0
DIMTFILLCLR       0
DIMTIH            ON
DIMTIX            OFF
DIMTM             0.0000
DIMTMOVE          0
DIMTOFL           OFF
DIMTOH            ON
DIMTOL            OFF
DIMTOLJ           1
DIMTP             0.0000
DIMTSZ            0.0000
DIMTVP            0.0000
DIMTXSTY          "Standard"
DIMTXT            0.1800
DIMTXTDIRECTION   OFF
DIMTZIN           0
DIMUNIT           2
DIMUPT            OFF
DIMZIN            0
DIMCONSTRAINTICON 3

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...