Jump to content

ACAD.lsp Opens help everytime


gadgetjay

Recommended Posts

Hi All,

 

 

I have created a ACAD.lsp to add 2 dimension styles every time I open a drawing.

It works but opens a help page every time?

 

 

any ideas what I have done wrong?

 

 

Code:

(command "._style" "ARIAL" "ARIAL.ttf" "0" "1" "" "" "" "")
(command
"DIMADEC"     "0"             ; Angular decimal places
"DIMALT"     "0"           ; Alternate units selected
"DIMALTD"     "0"             ; Alternate unit decimal places
"DIMALTF"     "3.2808"       ; Alternate unit scale factor
"DIMALTRND"   "0"             ; Alternate units rounding value
"DIMALTTD"    "0"             ; Alternate tolerance decimal places
"DIMALTTZ"    "0"             ; Alternate tolerance zero suppression
"DIMALTU"     "2"             ; Alternate units
"DIMALTZ"     "0"             ; Alternate unit zero suppression
"DIMAPOST"    "'"              ; Prefix and suffix for alternate text
"DIMASO"      "On"
"DIMASSOC"    "2"
"DIMASZ"      "500"           ; Arrow size
"DIMATFIT"    "3"             ; Arrow and text fit
"DIMAUNIT"    "0"             ; Angular unit format
"DIMAZIN"     "3"             ; Angular zero supression
"DIMBLK"      "."              ; Arrow block name
"DIMBLK1"     "."              ; First arrow block name
"DIMBLK2"     "."              ; Second arrow block name
"DIMCEN"      "-80"           ; Center mark size
"DIMCLRD"     "1"           ; Dimension line and leader color
"DIMCLRE"     "1"           ; Extension line color
"DIMCLRT"     "1"             ; Dimension text color
"DIMDEC"      "1"             ; Decimal places
"DIMDLE"      "50"        ; Dimension line extension
"DIMDLI"      "30"           ; Dimension line spacing
"DIMDSEP"     "."             ; Decimal separator
"DIMEXE"      "50"          ; Extension above dimension line
"DIMEXO"      "50"           ; Extension line origin offset
"DIMFIT"      "3"
"DIMFRAC"     "0"
"DIMGAP"      "50"          ; Gap from dimension line to text
"DIMJUST"     "0"             ; Justification of text on dimension line
"DIMLDRBLK"   "."              ; Leader block name
"DIMLFAC"     "0.001"        ; Linear unit scale factor
"DIMLIM"      "0"           ; Generate dimension limits
"DIMLUNIT"    "2"             ; Linear unit format
"DIMLWD"      "-2"            ; Dimension line and leader lineweight
"DIMLWE"      "-2"            ; Extension line lineweight
"DIMPOST"     "."              ; Prefix and suffix for dimension text
"DIMRND"      "0.0"        ; Rounding value
"DIMSAH"      "0"           ; Separate arrow blocks
"DIMSD1"      "0"           ; Suppress the first dimension line
"DIMSD2"      "0"           ; Suppress the second dimension line
"DIMSE1"      "0"           ; Suppress the first extension line
"DIMSE2"      "0"           ; Suppress the second extension line
"dimsho"      "1"
"DIMSOXD"     "0"           ; Suppress outside dimension lines
"DIMTAD"      "0"             ; Place text above the dimension line
"DIMTDEC"     "1"             ; Tolerance decimal places
"DIMTFAC"     "1"  
"DIMTIH"      "1"           ; Text inside extensions is horizontal
"DIMTIX"      "0"           ; Place text inside extensions
"DIMTM"       "200"        ; Minus tolerance
"DIMTMOVE"    "0"             ; Text movement
"DIMTOFL"     "0"            ; Force line inside extension lines
"DIMTOH"      "1"           ; Text outside horizontal
"DIMTOL"      "0"           ; Tolerance dimensioning
"DIMTOLJ"     "1"             ; Tolerance vertical justification
"DIMTP"       "0"        ; Plus tolerance
"DIMTSZ"      "0"        ; Tick size
"DIMTVP"      "0"        ; Text vertical position
"DIMTXSTY"    "ARIAL"            ; Associated Text style
"DIMTXT"      "500"          ; Text height
"DIMTZIN"     "0"             ; Tolerance zero suppression
"dimunit"     "2"
"DIMUPT"      "0"           ; User positioned text
"DIMZIN"      "12"             ; Zero suppression
"DIMFRAC"     "0"             ; Fraction format    (0 is stacked 2 horiz)
"DIMTFAC"     "1"         ; Tolerance text height scaling factor
"DIMSCALE""1"
"PSLTSCALE""0"
"DIMSTYLE" "_S" "Aisle Dim" "_Y")

(command
"DIMASZ"      "80"           ; Arrow size
"DIMAZIN"     "2"             ; Angular zero supression
"DIMCEN"      "0"           ; Center mark size
"DIMCLRT"     "7"             ; Dimension text color
"DIMDEC"      "2"             ; Decimal places
"DIMGAP"      "0"          ; Gap from dimension line to text
"DIMSTYLE" "_S" "Stand Size" "_Y")

(command
"TEXTSIZE""500"
);end command
(princ)
;;;;;

 

 

Thanks

Link to comment
Share on other sites

without lookin' at de code itself , this is typical for an extra enter ("") somewhere in your code

 

 

yip , your first line with the command has one enter to many

 

 

gr. R.

Link to comment
Share on other sites

Perhaps a better practice is to use setvar rather than command but you will need to do it for every line.

 

Better still why not just create a dimension style in your template dwg. At worst insert from another dwg.

Link to comment
Share on other sites

I done it that way as i just edited an exported dim style(s).

I prefer to load these directly in the drawings i receive automatically rather than keep having to insert them.

 

i'm having to go through all my scripts at the moment as my IT department decide to upgrade my CAD from 2010 to 2011 - which is now causing a few to give an " error: exceeded maximum number of selection sets" ..

 

Fun Fun Fun!

Link to comment
Share on other sites

Modifying every drawing every time it's opened seems harsh. Why not use something like

(tblsearch "DIMSTYLE" "Aisle Dim")

to see if the style is already in the drawing before adding it? There are a number of settings that are only modified as needed in my acaddoc.lsp. With good templates that only happens with outside drawings. Inserting a template with whatever text, dimension, ect… styles and layers you use would seem easier. I'd never use a command call in acaddoc.lsp, there's better ways to go. Always using localized variables to store selection sets in your lisp should avoid those errors although many AutoCAD commands add to the list of selection sets. LAYISO & MATCHPROP being the worst.

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...