elfert Posted February 9, 2012 Posted February 9, 2012 why do i get this error message in this lisp? Unknown command "N". Press F1 for help. Unknown command "VV". Press F1 for help. ;;;Vv - Calculates the weight a steelplate based on given in of plate thickness and a hatch or polyline object. :::Using a mass proberties of 7850 kg/m3 of steel plate. (defun c:vv ( / oldlayer oldcmdecho oldosnap ctextstyle fae thk wgt frar frarr fwgt fwgtm far farsf fip ) (setvar "OSMODE" 0) (setvar "cmdecho" 0) (setq oldlayer (getvar "clayer")) (setq oldcmdecho (getvar "cmdecho")) (setq oldosnap (getvar "osmode")) (setq ctextstyle (getvar "textstyle")) (Command "-style" "WEIGHT" "ISOCP.shx" "3.5" "1" "0" "n" "n" "n") (if (not (tblsearch "LAYER" "AM_WEIGHT")) (Command "-layer" "n" "AM_WEIGHT" "c" "6" "AM_WEIGHT" "s" "AM_WEIGHT" "P" "N" "AM_WEIGHT" "") (setvar "clayer" "AM_WEIGHT")) (command "-color" "BYLAYER" "") (prompt "\nChoose Polyline or Hatch for area and weight calculation: ") (setq fae (car (entsel))) (Command "area" "e" fae) (setq thk (getreal "\nThickness of plate? in mm: ")) (setq wgt (* thk 7850)) (setq frar (/ (getvar "area") 1)) (setq frarr (/ (getvar "area") 1000000)) (setq fwgt (* frarr wgt)) (setq fwgtm (/ fwgt 1000)) (setq far (rtos fwgtm 2 4)) (setq farsf (strcat "Plate thickness = " (rtos thk 2 2) "mm. -- Area =" (rtos frar 2 4) " mm2. -- Area =" (rtos frarr 2 4) " m2. -- weight = " far " kg./plate")) (setq fip (getpoint "\nChoose Text Insert Point:")) (Command "text" "s" "WEIGHT" "j" "MC" fip "45" farsf) (command "-layer" "s" oldlayer "") (command "-color" "BYLAYER" "") (setvar "TEXTSTYLE" ctextstyle) (setvar "OSMODE" oldosnap) (setvar "CMDECHO" oldcmdecho) (princ) ) Thx in advance! Quote
BlackBox Posted February 9, 2012 Posted February 9, 2012 Start here (see the colored code below) : ;;;Vv - Calculates the weight a steelplate based on given in of plate thickness and a hatch or polyline object. [color=red]:::[/color]Using a mass proberties of 7850 kg/m3 of steel plate. Quote
Stefan BMR Posted February 9, 2012 Posted February 9, 2012 Only need 2 "n" in ..."-style" ... and no "" at the end of (command "-color" ... Quote
elfert Posted February 9, 2012 Author Posted February 9, 2012 thx very much...for the quick reply Quote
Recommended Posts
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.