Jump to content

Recommended Posts

Posted

Hi guys,

 

Looking for a way to remove the leader of the dimordinate command.

 

Need to label a lot of RL's with just the text vertically under the point.

 

Thx.

Posted

Create a Dimstyle

Suppress the following:

Ext Line 1

Ext Line 2

Arrowheads-> None

Posted

Might be ....:)

 

(defun c:TesT (/		 selectionset	   integer
       selectionsetname	 elist		   newselectionset
       number		 newselectionsetname
      )
;;; Tharwat 15. Dec. 2011 ;;;
 (if (setq selectionset (ssget "_:L" '((0 . "DIMENSION"))))
   (repeat (setq integer (sslength selectionset))
     (setq selectionsetname
     (ssname selectionset
	     (setq integer (1- integer))
     )
     )
     (if
(member
  (cdr
    (assoc 100 (setq elist (reverse (entget selectionsetname))))
  )
  '("AcDbOrdinateDimension")
)
 (progn
   (command "_.explode" selectionsetname)
   (setq newselectionset (ssget "_P"))
   (repeat (setq number (sslength newselectionset))
     (setq newselectionsetname
	    (ssname newselectionset
		    (setq number (1- number))
	    )
     )
     (if
       (eq (cdr (assoc 0 (entget newselectionsetname))) "LINE")
	(entdel newselectionsetname)
     )
   )
 )
     )
   )
   (princ)
 )
 (princ)
)

Posted

Thanks Tharwat works nicely.. would like to display the y ordinate vertically, by default it is horizontal. Maybe need to reverse the x and y.

Posted
Thanks Tharwat works nicely..

 

You're welcome Dormant . :)

 

 

would like to display the y ordinate vertically, by default it is horizontal. Maybe need to reverse the x and y.

 

I think the Y coordinates are being vertically located and not horizontally , and do you want to rotate the texts to be horizontally or what ? I did not get your point well ?

 

Tharwat

Posted

IMO, exploding a dimension is not good practice. I would rather invoke a dimension overrides for extension lines and arrows

 

Just my 2 cents ;)

Posted
IMO, exploding a dimension is not good practice. I would rather invoke a dimension overrides for extension lines and arrows

 

Exploding dimordinates would show them as mtexts only, which is not as bad as exploding linear or aligned dimensions . Although that I agree with you entirely .

 

If you mean to replace the selected dimordinates with another style without lines and arrows that would be a very great idea indeed .:thumbsup:

 

Thanks

Posted

Ive attached what i had to do. Add a RL level for every 10m over 6km.

 

The person before me has made individual text boxs, would of taken them weeks.

 

I added the "FMG Survey Points" surpressing extensions etc, worked well.

 

Tharwat, my y ordinate is displaying horiziontally, would like vertically. But ive finished the task now.

OLC_Profile.dwg

Posted

Try this q&d code

Change it to suit

(defun C:dor(/ *error*  acsp actsp adoc hgt ip ord osm tgap tp)
(or (vl-load-com))
 (defun *error*  (msg)
   (if adoc (vla-endundomark adoc))
   (cond ((not msg))
         ((member msg '("Function cancelled" "quit / exit abort")
)
)
         ((princ (strcat "\n** Error: " msg " ** ")
)
)
)
  (if osm  (setvar 'osmode osm))
   (princ)
)
;;main part

(setq adoc  (vla-get-activedocument (vlax-get-acad-object))
     actsp (vla-get-activespace adoc)
)
(if (zerop actsp)
 (setq acsp (vla-get-paperspace adoc))
 (setq acsp (vla-get-modelspace adoc))
)
(vla-startundomark adoc)
(setq osm  (getvar 'osmode))
(setq hgt 1.0)      ;<-- change leader length here
(while (and (setvar 'osmode 513)        ; <-- change point snap mode to your suit
           (setq ip (getpoint "\nSpecify Ordinate Insertion Point (or press Enter to Exit): "))
      )
 (setq ord (vla-adddimordinate
             acsp
             (vlax-3d-point (trans ip 1 0))
             (vlax-3d-point (trans (mapcar '+ (list 0 hgt) ip) 1 0))
             :vlax-false
           )
 )
 ;; calculate exact value of the text gap accordingly to measurement value:
 (setq tgap (* (strlen (rtos (vla-get-measurement ord) 2 (getvar 'dimdec))) (/ (getvar 'dimtxt) 2)))
 (setq tp (vlax-3d-point (trans (mapcar '+ (list 0 (+ hgt tgap)) ip) 1 0)))
 (vla-put-textposition ord tp)
 (vla-put-textrotation ord 1.5708)
 (vla-put-textcolor ord 1)      ;<-- change text color here
   (vla-put-textrotation ord 1.5708)
 (vla-put-verticaltextposition ord 0)
 (vla-put-extlinefixedlensuppress ord :vlax-false)
 (vla-put-extlinefixedlen ord hgt)      ;<-- change leader length here
 (vla-put-arrowheadsize ord 0.0)
 (vla-put-extensionlineoffset ord 0.0)
 (vla-put-extensionlinecolor ord 4)      ;<-- change leader color here
)
(*error* nil)
 (princ)
 )
(prompt "\n\t***\tStart command with DOR\t***\n")
(prin1)

Posted

But ive finished the task now.

 

I guess the end justifies the means. :surrender:

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