Author Topic: Lets Build!  (Read 6869 times)

0 Members and 1 Guest are viewing this topic.

deegeecees

  • Guest
Re: Lets Build!
« Reply #15 on: September 13, 2005, 03:45:38 PM »
I'm gonna let this thread rest for a day. After that, whoever joined up will be the decision makers for the project startup. Here's what we've got thus far:

Deeg
Eloquintet
Murphy
Bob W (I think)

Bob Wahr

  • Guest
Re: Lets Build!
« Reply #16 on: September 13, 2005, 04:11:16 PM »
Can't guarantee how much time I will have on a regular basis to devote to the project and so far, don't see any ideas that I would use much with the possible exception of the text editor (Not a big fan of in-place editing (which is forced on you for mtext in 2006 (unless someone has found a way to turn it off that I couldn't (which would make me oh so happy)))) but I enjoy writing code and often can't come up with ideas for things to write so I'm definitely in.

deegeecees

  • Guest
Re: Lets Build!
« Reply #17 on: September 13, 2005, 04:17:09 PM »
Bob,
I don't have 2006 in front of me, so I'm not sure if this is still valid. In the Options, under the Support Files Tab there is the Text Editor portion that you can specify either "Internal" or something such as "NotePad". Hopefully you're a happy camper)))).

Pat

MikePerry

  • Guest
Re: Lets Build!
« Reply #18 on: September 13, 2005, 04:19:44 PM »
(Not a big fan of in-place editing (which is forced on you for mtext in 2006 (unless someone has found a way to turn it off that I couldn't (which would make me oh so happy))))
Hi

Check out the following links in this post - AutoCAD 2006 breaking info

"AutoCAD 2006 Tip: How to get the old Mtext fixed editor back" by Shaan Hurley

"AutoCAD 2006 - Solution when editing rotated text" by Jimmy Bergmark

"Single Line Text Tip for AutoCAD 2006" by Lynn Allen

"Getting AutoCAD 2006 DTEXT to behave!" by Lynn Allen

Have a good one, Mike

Bob Wahr

  • Guest
Re: Lets Build!
« Reply #19 on: September 13, 2005, 04:28:24 PM »
Thanks Mike.

"AutoCAD 2006 Tip: How to get the old Mtext fixed editor back" by Shaan Hurley

is exactly what I was after.

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Lets Build!
« Reply #20 on: September 13, 2005, 05:49:57 PM »
If we make an installer for all the routines, a help file is going to need to be made to find anything.

I have some experience with Acadinstall and inno setup. Currently my written/collected lisp routines are in an installer and work from acad2000-2005

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

deegeecees

  • Guest
Re: Lets Build!
« Reply #21 on: September 13, 2005, 05:54:30 PM »
Welcome aboard RonJon!

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Lets Build!
« Reply #22 on: September 13, 2005, 06:01:14 PM »
Count me in.  I have a GUI text editor that is very simple, maybe we can build on 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)

deegeecees

  • Guest
Re: Lets Build!
« Reply #23 on: September 13, 2005, 06:06:35 PM »
<saluting> Welcome aboard Commander!

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lets Build!
« Reply #24 on: September 13, 2005, 11:15:37 PM »
Hyper Text
http://www.caddepot.com/cgi-bin/cfiles/cfiles.cgi?0,0,0,0,5,2033


BLP Batch Lisp Processor
http://www.caddepot.com/cgi-bin/cfiles/cfiles.cgi?0,40,0,0,47

and finally....DTE (Dtext Editor release 1.1)
see screenshot below. (created on since AutoCAD 2000i)


« Last Edit: September 13, 2005, 11:18:06 PM by Andrea »
Keep smile...

hudster

  • Gator
  • Posts: 2848
Re: Lets Build!
« Reply #25 on: September 14, 2005, 03:40:24 AM »
Batch Processor:
- Multiple block/attribute selection for changes (i.e. revision, date, etc.)
- Dialog Box driven GUI with options for plotting, file selection and more
- Any other process that you can think of

the ability to process more than one drawing would be nice as well.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lets Build!
« Reply #26 on: September 14, 2005, 12:29:15 PM »
the ability to process more than one drawing would be nice as well.


Batch LISP Processor...
Keep smile...

t-bear

  • Guest
Re: Lets Build!
« Reply #27 on: September 14, 2005, 01:15:30 PM »
This could be fun....let me dig around and see what I have rat-holed away........

Murphy

  • Guest
Re: Lets Build!
« Reply #28 on: September 14, 2005, 01:41:40 PM »
Looks as though this is going the way of LISP.  :ugly:
 I have limited knowledge of that language so, I will be of limited help. I will do my best though.  :mrgreen:

Bob Wahr

  • Guest
Re: Lets Build!
« Reply #29 on: September 14, 2005, 01:43:59 PM »
I'll toss this in for the useless utilities section.  Think mirrtext 0 only for blocks and retroactively.
Code: [Select]
Option Explicit

Public Sub UnMirror()
On Error GoTo ErrorControl
  
  Dim strSet As String
  Dim intGroup() As Integer
  Dim varGroup() As Variant
  Dim varAtts As Variant
  Dim objSelSet As AcadSelectionSet
  Dim objSelSets As AcadSelectionSets
  Dim strBlkName As String
  Dim PI As Double
  Dim strSetName As String
  Dim objBlkRef As AcadBlockReference
  Dim objEnt As AcadEntity
  Dim intCnt As Integer
  
  PI = (Atn(1) * 4)
  Set objSelSets = ThisDrawing.SelectionSets
  strSetName = 1
  ReDim intGroup(0)
  ReDim varGroup(0)
  intGroup(0) = 0
  varGroup(0) = "insert"

BlockName:
  strBlkName = ThisDrawing.Utility.GetString(True, "Block to unmirror [All, Select, <default block name goes here>]:")
  If strBlkName = "" Or Left(strBlkName, 1) = " " Then
    ReDim Preserve intGroup(0 To 1)
    ReDim Preserve varGroup(0 To 1)
    intGroup(1) = 2
    varGroup(1) = "defaultblockname"
  ElseIf StrComp(strBlkName, "a", vbTextCompare) = 0 Or StrComp(strBlkName, "all", vbTextCompare) = 0 Then
    ReDim Preserve intGroup(0 To 1)
    ReDim Preserve varGroup(0 To 1)
    intGroup(1) = 2
    varGroup(1) = "*"
  ElseIf StrComp(strBlkName, "s", vbTextCompare) = 0 Or StrComp(strBlkName, "sel", vbTextCompare) = 0 Or StrComp(strBlkName, "select", vbTextCompare) = 0 Then
    KillSet strSetName
    Set objSelSet = objSelSets.Add(strSetName)
    objSelSet.SelectOnScreen intGroup, varGroup
    ReDim intGroup(0 To (objSelSet.Count) + 1)
    ReDim varGroup(0 To (objSelSet.Count) + 1)
    intGroup(0) = -4
    varGroup(0) = "<or"
    intGroup((objSelSet.Count) + 1) = -4
    varGroup((objSelSet.Count) + 1) = "or>"
    
    For intCnt = 1 To objSelSet.Count
      If TypeOf objSelSet.Item(intCnt - 1) Is AcadBlockReference Then
        Set objBlkRef = objSelSet.Item(intCnt - 1)
        intGroup(intCnt) = 2
        varGroup(intCnt) = objBlkRef.Name
      End If
    Next intCnt
  Else
    ReDim Preserve intGroup(0 To 1)
    ReDim Preserve varGroup(0 To 1)
    intGroup(1) = 2
    varGroup(1) = strBlkName
  End If
  
  KillSet strSetName
  Set objSelSet = objSelSets.Add(strSetName)
  objSelSet.Select acSelectionSetAll, , , intGroup, varGroup
  
  If objSelSet.Count > 0 Then
    GoTo FollowTheRabbit
  Else
    ThisDrawing.Utility.Prompt vbCrLf & "**No Blocks Selected**" & vbCrLf
    GoTo ExitHere
  End If
  
FollowTheRabbit:
  Dim dblMSpc As Double
  Dim dblPSpc As Double
  Dim dblRotRad As Double
  Dim dblRotDeg As Double
  Dim dblScale(0 To 2) As Double
  Dim dblInsPt(0 To 2) As Double
  Dim objNewRef As AcadBlockReference
  Dim varOldAtt As Variant
  Dim varNewAtt As Variant
  
  dblMSpc = ThisDrawing.ModelSpace.ObjectID
  dblPSpc = ThisDrawing.PaperSpace.ObjectID
  
    For Each objEnt In objSelSet
      If TypeOf objEnt Is AcadBlockReference Then
        Set objBlkRef = objEnt
        If objBlkRef.XScaleFactor < 0 Then
          dblInsPt(0) = objBlkRef.InsertionPoint(0)
          dblInsPt(1) = objBlkRef.InsertionPoint(1)
          dblInsPt(2) = objBlkRef.InsertionPoint(2)
          dblScale(0) = objBlkRef.XScaleFactor * -1
          dblScale(1) = objBlkRef.YScaleFactor
          dblScale(2) = objBlkRef.ZScaleFactor
          dblRotRad = objBlkRef.Rotation
          dblRotDeg = (dblRotRad * 180) / PI
          If dblRotDeg > 120 And dblRotDeg < 330 Then
            dblRotDeg = dblRotDeg + 180
            If dblRotDeg > 360 Then
              dblRotDeg = dblRotDeg - 360
            End If
            dblRotRad = (PI * dblRotDeg) / 180
          End If
          If objBlkRef.OwnerID = dblMSpc Then
            Set objNewRef = ThisDrawing.ModelSpace.InsertBlock(dblInsPt, objBlkRef.Name, dblScale(0), dblScale(1), dblScale(2), dblRotRad)
            If objNewRef.HasAttributes Then
              varOldAtt = objBlkRef.GetAttributes
              varNewAtt = objNewRef.GetAttributes
              For intCnt = 0 To UBound(varOldAtt)
                varNewAtt(intCnt).TextString = varOldAtt(intCnt).TextString
              Next intCnt
            End If
            objNewRef.Layer = objBlkRef.Layer
            objNewRef.Linetype = objBlkRef.Linetype
            objNewRef.LinetypeScale = objBlkRef.LinetypeScale
            objNewRef.Lineweight = objBlkRef.Lineweight
            If Left(ThisDrawing.GetVariable("acadver"), 2) = "16" Then
              objNewRef.TrueColor = objBlkRef.TrueColor
            Else
              objNewRef.color = objBlkRef.color
            End If
            objNewRef.Visible = objBlkRef.Visible
            objBlkRef.Delete
            objNewRef.Update
          Else
            Set objNewRef = ThisDrawing.PaperSpace.InsertBlock(dblInsPt, objBlkRef.Name, dblScale(0), dblScale(1), dblScale(2), dblRotRad)
            If objNewRef.HasAttributes Then
              varOldAtt = objBlkRef.GetAttributes
              varNewAtt = objNewRef.GetAttributes
              For intCnt = 0 To UBound(varOldAtt)
                varNewAtt(intCnt).TextString = varOldAtt(intCnt).TextString
              Next intCnt
            End If
            objNewRef.Layer = objBlkRef.Layer
            objNewRef.Linetype = objBlkRef.Linetype
            objNewRef.LinetypeScale = objBlkRef.LinetypeScale
            objNewRef.Lineweight = objBlkRef.Lineweight
            If Left(ThisDrawing.GetVariable("acadver"), 2) = "16" Then
              objNewRef.TrueColor = objBlkRef.TrueColor
            Else
              objNewRef.color = objBlkRef.color
            End If
            objNewRef.Visible = objBlkRef.Visible
            objBlkRef.Delete
            objNewRef.Update
            End If
        End If
      End If
    Next objEnt
      
ExitHere:
Exit Sub

ErrorControl:
  Select Case Err.Number
    Case Else
      MsgBox "''" & Err.Description & "'' error has occured in UnMirror" & vbCr & _
      "All Blocks May NOT have updated correctly" & vbCrLf & _
      "Please report the error to Eric Bussey", vbCritical, "Error in UnMirror"
      GoTo ExitHere
  End Select
 


End Sub

Function KillSet(strSet As String)
  Dim objSelSet As AcadSelectionSet
  Dim objSelSets As AcadSelectionSets
  
  Set objSelSets = ThisDrawing.SelectionSets
      
  For Each objSelSet In objSelSets
    If objSelSet.Name = strSet Then
      ThisDrawing.SelectionSets.Item(strSet).Delete
    Exit For
    End If
  Next

End Function
 Threw it together quickly for a specific need, then went back and added additional functionality.  Was going to go back and take a long look at it later but never did.  It works though.