Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/28/2021 in all areas

  1. Use the filter command then select all and change the dimensions in the properties palette.
    2 points
  2. No need for trial and error. Add points to the car (block) at the center of the tires and create an arc with a radius of the wheel base centered on the rear wheel (I assume the rear is to the left). Construct an offset line to the surface profile at a distance equal to the radius of the tires (0.35 in your drawing). Position the center of the rear (left?) tire on the offset line as shown here using osnap nearest. Set osnap to endpoint, node, intersection and ow give the rotate command and click the center of the rear tire for the Base Point and then enter R and click the center of the rear wheel again and then the center of the front wheel and then click at the intersection of the red arc and the magenta offset line. This will precisely position the car. If you do not need precise rotation you can eyeball it! Here's the result of 4 positionings. car align to curve.01.dwg
    2 points
  3. @bsimpson - and it has options built in to do other rotations.
    1 point
  4. @bsimpson - to me, this routine does rotate the point so that it is parallel to the alignment.
    1 point
  5. Its a bad idea to end up with removing authors' names from their original codes.
    1 point
  6. I would do it manually, but not tonight. Lisp is no substitute for using AutoCAD properly.
    1 point
  7. Your proposed profile does look a bit odd, going up and down. Surely the most efficient profile to get from one gradient to another is a circular curve. I am not sure how a lisp programme would be of any use in this instance. Get the two gradients from the DTM and fillet between them with the radius given above (surely minimum radius, not maximum). I see the ground clearance is 0.11 m. What happens if a driver of different weight gets in? Perhaps increase the ground profile radius to 10m.
    1 point
  8. (defun c:Test (/ ins str) ;; Tharwat - Date: 29.Mar.2021 ;; (and (or (> (getvar 'DWGTITLED) 0) (alert "Save the drawing then try again!") ) (setq ins (getpoint "\nSpecify the insertion point : ")) (setq str (entmakex (list '(0 . "MTEXT") '(100 . "AcDbEntity") '(100 . "AcDbMText") (cons 10 (trans ins 1 0)) '(1 . "") ) ) ) (vla-put-textstring (vlax-ename->vla-object str) "%<\\AcVar Filename \\f \"%tc4%fn7\">%" ) ) (princ) )
    1 point
  9. Thanks for your responses. I ended up with this code: (defun c:pdm (/ ins str) (and (or (> (getvar 'DWGTITLED) 0) (alert "Save the drawing then try again!") ) (setq ins (getpoint "\nChoose where you want to insert the file name : ")) (setq str (entmakex (list '(0 . "MTEXT") '(100 . "AcDbEntity") '(100 . "AcDbMText") (cons 10 (trans ins 1 0)) '(1 . "") ) ) ) (vla-put-textstring (vlax-ename->vla-object str) "{\\fArial|b1|i0|c0|p34;\\C2;%<\\AcVar Filename \\f \"%tc4%fn6\">%}" ) ) (princ) ) Is there a way to define the text size (height) in this code?
    -1 points
×
×
  • Create New...