Author Topic: Editing Block Text Font???  (Read 4725 times)

0 Members and 1 Guest are viewing this topic.

CottageCGirl

  • Guest
Editing Block Text Font???
« on: November 29, 2005, 01:46:41 PM »
We have a corporate map of every cubical, every employee name is listed as an editable block (on ACAD 2005) This map was made a long time ago, but now it needs to be converted by another department and Adobe cant read the font the text is in.  Can I edit (globally) the font style of all of the 300+ blocks?

M-dub

  • Guest
Re: Editing Block Text Font???
« Reply #1 on: November 29, 2005, 02:02:22 PM »
Here's a thought...don't know if it would work, though.

Try deleting the bad font type and changing your alternate font file in the options of acad to whatever you want.  I'm thinking (hoping) that it will revert to that one when it finds that the original font is missing from your PC.

/guess

PHX cadie

  • Water Moccasin
  • Posts: 1902
Re: Editing Block Text Font???
« Reply #2 on: November 29, 2005, 02:03:58 PM »
I don't think the info be lost if a temp insert of the block were inserted, exploded, change the font, then redefine the block with the same name. I believe all 300 blocks would update.
Acad 2013 and XM
Back when High Tech meant you had an adjustable triangle

Bob Wahr

  • Guest
Re: Editing Block Text Font???
« Reply #3 on: November 29, 2005, 02:05:53 PM »
it would be really easy to do in VBA
  • Iterate through the blocks in the drawing
  • Iterate through the text in each block
  • chage the font
  • lather, rinse, repeat until done

M-dub

  • Guest
Re: Editing Block Text Font???
« Reply #4 on: November 29, 2005, 02:06:12 PM »
Well, to clarify, is it 300 different blocks or 300 instances of one block?  If it's the latter of the two, redefining that block would be the best route, I think.

Bob Wahr

  • Guest
Re: Editing Block Text Font???
« Reply #5 on: November 29, 2005, 02:07:15 PM »
Agree with M-Dub.  Are the employee names attributes?  If so you will probably have to attsync after redefining.

M-dub

  • Guest
Re: Editing Block Text Font???
« Reply #6 on: November 29, 2005, 02:08:15 PM »
good point!

CottageCGirl

  • Guest
Re: Editing Block Text Font???
« Reply #7 on: November 29, 2005, 03:39:23 PM »
-sorry for the delayed response, been in a meeting.....it is the same block, the emploee names are attributes.....I will look at all your options now

nivuahc

  • Guest
Re: Editing Block Text Font???
« Reply #8 on: November 29, 2005, 05:55:28 PM »
Why not just change the text style to a different font?  :|


whdjr

  • Guest
Re: Editing Block Text Font???
« Reply #9 on: November 29, 2005, 07:03:10 PM »
Why not just change the text style to a different font?  :|



DING! DING! DING! DING!

Bob Wahr

  • Guest
Re: Editing Block Text Font???
« Reply #10 on: November 29, 2005, 09:04:27 PM »
I can think of several reasons but they are all either personal preference or dependant upon conditions that I don't know exist.

CottageCGirl

  • Guest
Re: Editing Block Text Font???
« Reply #11 on: November 30, 2005, 08:31:49 AM »
Why not just change the text style to a different font?  :|



DING! DING! DING! DING!

The names are embedded within the block, how do I do that, I have tried everything I know how to do, I exploded the bock, changed the font, redefined the block and  reinserted it, and the font was the same as the origional?????  What dumb litlle thing am I missing...?

Murphy

  • Guest
Re: Editing Block Text Font???
« Reply #12 on: November 30, 2005, 08:40:15 AM »
Set up your new text style with the correct font. Then use this
Code: [Select]
Public Sub AttsTYLE()
On Error Resume Next
Dim tempBlock As AcadBlock
Dim tempRef As AcadBlockReference
Dim blkObj As AcadObject
Dim tempObjectName As String
Dim objSelSet As AcadSelectionSet
Dim intType(0) As Integer
Dim varData(0) As Variant
Dim varAtts As Variant
Dim intCnt As Integer
Dim pref As String
Dim addon As Integer
Dim aString As String
Dim oEnt As AcadEntity
Dim oSSobjs(0) As AcadEntity
Dim vPick As Double
'Get the prefix we are looking for from the user
pref = InputBox("Name of new TextStyle", "Attribute TextStyle", "Default")
ThisDrawing.SelectionSets("ATTADD").Delete
Set objSelSet = ThisDrawing.SelectionSets.Add("ATTADD")
objSelSet.Select acSelectionSetAll
'Look through everything for block references
AllNotSome:
For Each tempRef In objSelSet
    For Each blkObj In tempRef
        If TypeOf blkObj Is AcadText Then
            blkObj.StyleName = pref
            blkObj.Height = 0.1
        End If
    Next
    'Found one but, does it have attributes
    If tempRef.HasAttributes Then
   
        'It does, so now go through each one
        varAtts = tempRef.GetAttributes
        For intCnt = LBound(varAtts) To UBound(varAtts)
            With varAtts(intCnt)
                .StyleName = pref
                .Height = 'You can enter your desired height or erase this line
            End With
            'Go to the next attribute
        Next intCnt
    End If
'next block please
Next
End Sub

This will do all blocks in a drawing. If you need to only select certain blocks let me know and I will modify the code for you.

M-dub

  • Guest
Re: Editing Block Text Font???
« Reply #13 on: November 30, 2005, 08:41:04 AM »
attsync

CottageCGirl

  • Guest
Re: Editing Block Text Font???
« Reply #14 on: November 30, 2005, 03:12:55 PM »
attsync

tried Attsync and it didn't seem to do anything....