Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/09/2022 in all areas

  1. I am no expert but lets work it out.... (defun dtr.... and (defun rtd... sound familiar, degrees to radians and radians to degrees, and look OK so lets discount them as a problem (setq *error* sm-error) runs the LISP sm-error of there is an error happening, lets look through that.... a load of reset setvar to old.... looks OK and then a princ command "SM Error" which is what you are seeing. So if there is an error, the (setq *error* spots this and runs sm-error, ending with you seeing "SM Error" on the screen... and if you see that then the error function is working OK I reckon. Lets ignore that bit then Leaving you with (defun S::Startup. Hmmm, if we remove each line with a ; and then delete them one by one that should give the problem You can try this before going further? next step is to put back in the easy bits that shouldn't casue a problem, put back the cmdecho lines and setq without any calculations. Plotscale MirrorDef, comdecho, princ all work OK, now try the conds... all good? doing it step by step I reckon you are left with the the first 2 lines of code (setq piddirpre (findfile "pidsetup.lsp")) (setq piddir (substr piddirpre 1 (- (strlen piddirpre) 12))) piddir needs piddirpre to work. piddirpre... find file "pldsetup.lsp', oh, that could be a problem, where is this file? When the old computer died did it get moved to the new ones trusted files location? Does it still exist even? If it is another location, have you made it searcheable by default by CAD - something you might have done years ago and forgotten about If you can locate the file and it isn't found by CAD, try hard coding in the file path where it exists, remembering to add a double // instead of a single / for text file paths in between " If you are having a problem with another file, could the cause be the same, not finding the file it is looking for, could be they didn't get copied, could be you need to set a trusted file location to be where they are saved.
    1 point
  2. and likewise a code that you have tested along the way 'works' until you restart everything (often a forgotten variable hanging about).... restart is always a good 'nearly finished' test of a code
    1 point
  3. Modified from here to add arrow size and text height https://www.cadtutor.net/forum/topic/75686-please-help-me-create-a-lisp-to-change-color-of-dimension/?do=findComment&comment=598520 ;; Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; (defun c:Test (/ ss ent obj) (if (setq ss (ssget "_:L" '((0 . "*DIMENSION")))) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (setq obj (vlax-ename->vla-object ent)) (vla-put-Color obj 1) (vla-put-TextColor obj 1) (vla-put-ExtensionLineColor obj 1) (vla-put-DimensionLineColor obj 1) (vla-put-arrowheadsize obj 0.60) (vla-put-textheight obj 0.50) ) ) (princ) )
    1 point
  4. I wholeheartedly agree with the advice Dadgad has provided you. Basically, the arcs are just concentric circles as you can see from the progression below...
    1 point
  5. Damn must be getting old! that website is using like what font size 2 had to blow it up 180% just to read it. Its possible just have to change the ssget in the vl-getattributevalue function. to use WP instead of X build coords off the viewport to select things in model space. (setq ss (ssget "_X" (list (cons 0 "INSERT")(cons 2 _LOAblkname)(cons 410 lname)))) changes to (setq ss (ssget "_WP" coords (list (cons 0 "INSERT")(cons 2 _LOAblkname)))) Example here cen = center of view port c40 = width of view port c41 = height of view port
    1 point
×
×
  • Create New...