Author Topic: Dimensioning Help  (Read 2383 times)

0 Members and 1 Guest are viewing this topic.

Artisan

  • Guest
Dimensioning Help
« on: April 05, 2005, 02:39:58 PM »
Ok, I have tried to work this out, but I am getting no where. Let me tell you all what I am looking for.

On our plans, I try to turn off the extension lines on dimensions that fall on walls or other lines, just to keep the overlapping effect gone. To do this, I have been selecting each dimension line and changing its properties to turn off either the right, left or both extension lines. The variables for these are DIMSE1 & DIMSE2. The thing I want to do is create a button for each task. The problem I am having is that I cannot turn the DIMSE1 and DIMSE2 variables off all together because it would affect all of the dimensions. My thoughts are to have a button to allow me to select a certain dimension line, then allow me the option to turn off either the right, left or both extension lines without affecting the other ones that I did not select. Does anyone understand what I am trying to do here? Thanks

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Dimensioning Help
« Reply #1 on: April 05, 2005, 02:49:50 PM »
i understand what you want. I will check to see if you can do that
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dimensioning Help
« Reply #2 on: April 05, 2005, 03:23:25 PM »
Good to see you back.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Dimensioning Help
« Reply #3 on: April 05, 2005, 03:28:36 PM »
Quote from: CAB
Good to see you back.

Me or Artisan?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dimensioning Help
« Reply #4 on: April 05, 2005, 03:32:41 PM »
Artisan.

CmdrDuh
Sorry, I didn't know you were away.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Dimensioning Help
« Reply #5 on: April 05, 2005, 03:43:27 PM »
Its VBA but
Code: [Select]
Option Explicit
Public Sub FixDimsL()

Dim objSelected As Object
Dim objSelSet As AcadSelectionSet
Dim N As Integer, intCode(0) As Integer
Dim strCode(0) As String, obj As AcadObject, objEnt As AcadEntity, objDim As AcadDimension
Dim dblPt1(2) As Double, objCenter As Variant
On Error Resume Next

If ThisDrawing.SelectionSets.Count > 0 Then
    For N = 0 To ThisDrawing.SelectionSets.Count - 1
        If ThisDrawing.SelectionSets.Item(N).Name = "FIXd" Then
        ThisDrawing.SelectionSets("FIXd").Delete
        End If
    Next N
End If
Set objSelSet = ThisDrawing.SelectionSets.Add("FIXd")
objSelSet.SelectOnScreen
    For Each obj In objSelSet
        If obj.ObjectName = "AcDbRotatedDimension" Then

        obj.ExtLine1Suppress = True
        End If
    Next obj
ThisDrawing.SelectionSets("FIXd").Delete
Exit Sub
End Sub


Public Sub FixDimsR()

Dim objSelected As Object
Dim objSelSet As AcadSelectionSet
Dim N As Integer
Dim obj As AcadObject
On Error Resume Next

If ThisDrawing.SelectionSets.Count > 0 Then
    For N = 0 To ThisDrawing.SelectionSets.Count - 1
        If ThisDrawing.SelectionSets.Item(N).Name = "FIXd" Then
        ThisDrawing.SelectionSets("FIXd").Delete
        End If
    Next N
End If
Set objSelSet = ThisDrawing.SelectionSets.Add("FIXd")
objSelSet.SelectOnScreen
    For Each obj In objSelSet
        If obj.ObjectName = "AcDbRotatedDimension" Then
       
        obj.ExtLine2Suppress = True
        End If
    Next obj
ThisDrawing.SelectionSets("FIXd").Delete
Exit Sub
End Sub


Run macro FixDimsL or FixDimsR
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Dimensioning Help
« Reply #6 on: April 05, 2005, 03:44:14 PM »
i wasn't, but I didn't know Artisan was either.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Dimensioning Help
« Reply #7 on: April 05, 2005, 03:48:13 PM »
Ok, one last thing, I made 2 macros one for each side instead of it asking you right or left.  I can change it if you want.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Artisan

  • Guest
Dimensioning Help
« Reply #8 on: April 05, 2005, 03:52:53 PM »
Quote from: CAB
Good to see you back.


Thanks CAB. It's been a long hard weekend, but life goes on. Thank you all for your thoughts and prayers.

Artisan

  • Guest
Dimensioning Help
« Reply #9 on: April 05, 2005, 03:53:55 PM »
Quote from: CmdrDuh
Ok, one last thing, I made 2 macros one for each side instead of it asking you right or left.  I can change it if you want.


Many Thanks CmdrDuh, I'll give it a try.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Dimensioning Help
« Reply #10 on: April 05, 2005, 03:54:57 PM »
I just noticed your sig.  Sorry to hear about your loss.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

PDJ

  • Guest
Dimensioning Help
« Reply #11 on: April 05, 2005, 05:09:31 PM »
Here's an old one from the Hot Tip Harry archives over on Cadalyst.  Hope it's ok to post it here..

Code: [Select]
; TIP1169.LSP: TE.LSP   Toggle Extension Lines   (c)1995, Donald L. Levine

;; TE.LSP will Toggle Extension lines simply by picking the dimension
;; several times until the desired result is achieved.  You can toggle
;; as many as you want without exiting the command.  Use the enter button
;; to quit.

(defun cler (VAL)
  (if (/= VAL "Function cancelled")     ; In case of an error
    (princ (strcat "\nError: " VAL))    ; while this command is active...
  )
  (setvar "DIMSE1" EL1)
  (setvar "DIMSE2" EL2)
  (command "_.UNDO" "_end")
  (setq *error* OLDERR)               ; Restore old *error* handler
  (princ)                            
)

(defun conv1 (EL1)
  (if (= (Getvar "DIMSE1") 1) (setvar "DIMSE1" 0) (setvar "DIMSE1" 1))
)

(defun conv2 (EL2)
  (if (= (Getvar "DIMSE2") 1) (setvar "DIMSE2" 0) (setvar "DIMSE2" 1))
)

;;; --------------------------- Main Program ---------------------------------;
(DEFUN C:Tog (/ EL1 EL2 ENT)
  (setq OLDERR *error*
  *error* CLER)
  (COMMAND "_.UNDO" "_GROUP")
  (setq EL1 (getvar "DIMSE1"))
  (setq EL2 (getvar "DIMSE2"))
  (setq ENT nil)
  (setq ENT (entsel))
  (while ENT
    (if ENT
      (progn
        (conv1 EL1)
        (command "dim" "upd" ENT "" "e")
        (setq ENT (entsel))
        (if ENT
          (progn
            (conv1 EL1)
            (conv2 EL2)
            (command "dim" "upd" ENT "" "e")
            (setq ENT (entsel))
            (if ENT
              (progn
                (conv1 EL1)
                (command "dim" "upd" ENT "" "e")
                (setq ENT (entsel))
                (if ENT
                  (progn
                    (conv1 EL1)
                    (conv2 EL2)
                    (command "dim" "upd" ENT "" "e")
                    (setq ENT (entsel))
                  )
                )
              )  
            )
          )
        )
      )
    )
  )
  (setvar "DIMSE1" EL1)
  (setvar "DIMSE2" EL2)
  (setq *error* OLDERR)               ; Restore old *error* handler
  (command "_.UNDO" "_end")
  (prin1)
); end tog.lsp