×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Setting ordinate dimention prefix or suffix

Setting ordinate dimention prefix or suffix

Setting ordinate dimention prefix or suffix

(OP)
Is there any way to set ordinate dimension prefix or suffix. I use this dim style for building floor heights and would like AGL or EL with the dim text.

If not, is there a better way to show this dim?  

RE: Setting ordinate dimention prefix or suffix

Go to Dimension Style/Modify/Primary Units. In this window you can add a prefix or suffix to the actual dimension. Remember to save it and set current.

RE: Setting ordinate dimention prefix or suffix

(OP)
Wouldn't that apply the prefix/suffix to all dims?

RE: Setting ordinate dimention prefix or suffix

Yes it does.

RE: Setting ordinate dimention prefix or suffix

(OP)
Then it's not an option, unless I set up a dimstyle especially for my elevation dims.

Guess that might work.

Thanks for the advice

RE: Setting ordinate dimention prefix or suffix

This will let you choose which dims to change...

(defun ADDDIMSUFFIX (/ CNT DIMENT DIMSS NEWDIM SUF)
(setq DIMSS (ssget '((0 . "DIMENSION")))
      CNT 0
      SUF "AGL")
  (while (< CNT (sslength DIMSS))
    (setq DIMENT(entget(ssname DIMSS CNT)))
    (setq NEWDIM (cons 1 (ST_SREP "<>"(strcat "<>" " " SUF)(cdr(assoc 1 DIMENT)))))
    (entmod (subst NEWDIM (assoc 1 DIMENT) DIMENT))
    (setq CNT (+ CNT 1))
    ) ;while
  ) ;defun

(defun st_srep (srch_str rep_str target_str / str_pad result i)
  (setq str_pad target_str
        result  ""
    )
  (while ; str_scan returns nil when the search string is not found
    (setq i (st_scan srch_str str_pad))
     (setq result
        (strcat
          result
          (substr str_pad 1 (1- i))
          rep_str
          )
       )
     (setq str_pad ; remove section copied to !result from str_pad
        (substr str_pad (+ i (strlen srch_str)))
       )
     )
    ; copy any leftover data to the !result string
  (if (> (strlen str_pad) 0)
    (setq result (strcat result str_pad))
    )
  result
  )

(defun st_scan (object target / obj_len targ_len rep_limit i result)
  (setq obj_len  (strlen object))
  (setq targ_len (strlen target))
  (setq rep_limit (- targ_len obj_len -1))
  (setq i 0)
  (while
    (cond
      ( (> (setq i (1+ i)) rep_limit)
        (setq result nil)
        nil ; at the end of the string - stop the loop
      )
      ( (= object (substr target i obj_len ))
        (setq result i)
        nil ; substring found - stop the loop
      )
      (T T) ; otherwise continue
    )
  )
  result
)

"Everybody is ignorant, only on different subjects." — Will Rogers

RE: Setting ordinate dimention prefix or suffix

(OP)
Nice, Thanks a lot

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources