Jump to content

Recommended Posts

Posted

Gday,

Here's my immediate problem, im putting chainage lines off the centerline of a road and i need to find out how far to come around the curve in the road. eg i start a one end of a curve and i need to put a chainage line 5m around the curve.

 

whats the best way to do that? Help!

 

Pauly.

Posted

It's ok. Dont Panic Pauly, take a deep breath!

 

I found a way,which included drawing an arc using the center point of the curve on the road then specifying the lenght:)

 

But if anybody knows an even easier way to do it dont be afraid to jump in!

Posted

Use the command MEASURE, and make sure that the POINT is set as a visible mode :)

Posted

OR you can create a block containing the information you wish to show as your chainage. then use measure, but use block, then your distance along the curve you wish to place your chainage at

Posted

you could:

OFFSET your curve

DRAW 'POINT' at one end

ARRAY that point

(I think, can't check on this laptop)

Posted

Maybe...

 

(defun c:cdim(/ cCurve obType lEnt vlaDim pt1
      pt2 dis1 dis2 curMea *error*)

 (vl-load-com)

 (defun *error*(msg)
   (setvar "CMDECHO" 1)
   (if cCurve
     (vla-Highlight cCurve :vlax-false)
     ); end if
   (if vlaDim
     (vla-Delete vlaDim)
     ); end if
   (princ "\n*Cancel* ")
   (princ)
   ); end of *error*
 
 (if
    (setq cCurve
   (entsel
       "\nSelect curve > ")); end setq
   (progn
     (setq cCurve
     (vlax-ename->vla-object
       (car cCurve))); end setq
     (if
(member
  (setq obType
	 (vla-get-ObjectName cCurve))
  '("AcDbLine" "AcDbPolyline" "AcDb3dPolyline"
    "AcDbSpline" "AcDbArc" "AcDbCircle" "AcDbEllipse")
  ); end member
(progn
  (vla-Highlight cCurve :vlax-true)
  (setvar "OSMODE" 3071)
  (setvar "CMDECHO" 0)
  (setq lEnt(entlast))
  (command "_.dimaligned")
  (princ "\nSelect first extension line point on curve > ")
  (command pause)
  (princ "\nSelect second extension line point on curve > ")
  (command pause)
  (princ "\nSpecify dimension line location")
  (command pause)
  (if
    (not(equal lEnt(entlast)))
    (progn
      (setq vlaDim
	     (vlax-ename->vla-object
	                    (entlast))
	    pt1(vlax-safearray->list
		(vlax-variant-value
		 (vla-get-ExtLine1Point vlaDim)))
	    pt2(vlax-safearray->list
		 (vlax-variant-value
		  (vla-get-ExtLine2Point vlaDim)))
	    ); end setq
      (if
	(and
	  (setq dis1
		 (vlax-curve-GetDistAtPoint cCurve pt1))
	  (setq dis2
		 (vlax-curve-GetDistAtPoint cCurve pt2))
	  ); end and
	(progn
	  (if(< dis2 dis1)
	    (setq curMea(- dis1 dis2))
	    (setq curMea(- dis2 dis1))
	    ); end if
	  (vla-put-TextOverride vlaDim
	    (strcat "L = "(rtos(* curMea
				  (getvar "DIMLFAC"))
			          (getvar "DIMLUNIT")
			          (getvar "DIMTDEC"))))
	  ); end progn
	 (progn
	   (princ "\n>>> One one both points not on curve <<< ")
	   (vla-Delete vlaDim)
	  ); end progn
	); end if
      ); end progn
    ); end if
  ); end progn
(princ "\n>>> Invalid object type! <<<")
); end if
     ); end progn
   (princ "\n>>> Nothing selected! <<< ")
   ); end if
   (if cCurve
     (vla-Highlight cCurve :vlax-false)
     ); end if
 (setvar "CMDECHO" 1)
 (princ)
 ); end of c:cdim

(princ "\nType CDIM for curve dimension ")

CDim.gif

  • 7 years later...
Posted

using array is the best option to place points and label nearby the polyline.

Posted

Thank you for that. Did you realize that this thread is almost 8 years old?

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