Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Extracting Tool Palettes Properties similiar to extracting Block Properties?  using ADT AutoCAD 2006.

Posted on 2006-05-25
9
Medium Priority
?
312 Views
Last Modified: 2012-05-05
I'm trying to extract an object's properties (like Room Number and Room Name) that originally resides in a Tool Palette.
I can click on the object and explode it which gives the following:

F_ROOMFINISHOBJECTS:NETFLOORAREA
F_ROOMFINISHOBJECTS:ROOMNUMBER
F_ROOMFINISHOBJECTS:RMNAME

The F_ is the initial of my architectural firm that I work with.
The ROOMFINISHOBJECTS is the actual object name.

And I'm trying to pull the NETFLOORAREA values along with ROOMNUMBER and RMNAME into a text file.

I've tried using ATTEXT and put in a template:

FKP_ROOMFINISHOBJECTS:NETFLOORAREA C048000
FKP_ROOMFINISHOBJECTS:ROOMNUMBER C048000
FKP_ROOMFINISHOBJECTS:RMNAME C048000

it didn't give me any info - 0 records.

So I tried:

NETFLOORAREA C048000
ROOMNUMBER C048000
RMNAME C048000

and that also gave me 0 records.

I haven't got to talk to you guys in awhile.  Ya'll were great at answering my questions in times past - hope you can help me with this one.  Please note this is ADT 2006 instead of the AutoCAD 2000 that I had used in the past.  Most of the block stuff was converted to the Tool Palettes.

Thanks.

Stephen
0
Comment
Question by:stephenlecomptejr
  • 5
  • 3
9 Comments
 
LVL 13

Expert Comment

by:gonzal13
ID: 16767012
You can export the attribute tag names and their values to excel from blocks
0
 
LVL 1

Author Comment

by:stephenlecomptejr
ID: 16768106
Thank you very much... but I really want to get the VBA code to do this programmatically.

That way I can do the reverse of importing adjusted data back in.
0
 
LVL 10

Expert Comment

by:norrin_radd
ID: 16872677
hey stephen,
are these blocks with attributes? I know you want vba, but if these are blocks with attributes a quick workaround would be to use the _eattext command. In 2006 it is a beefed up attributes extractor that alows you to extract them to a table in the dwg. You may be able to use that for what you need with out any vba.
Sorry I havent been able to help with the vba, so busy lately when lunch comes around I'm getting the heck outa here ;)

let us know if that helped at all.
0
[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

 
LVL 10

Expert Comment

by:norrin_radd
ID: 16893887
not sure if this code will help you. but this is part of some code that I use in a form to extract title block info and put it in database. Not sure if this will help you but it may give you an idea how to extract that info using vba. The **.text parts refer to text boxes in my form, then I send the info from the form to the database. There is lots of other code to go with the database part of it. Anyhow take a look and see if this will help.

Private Sub getFilename_Click()
Dim AttArray As Variant
Dim obj As Object
Dim msg, Style, Title, Help, Ctxt, response, MyString
Dim BlkRef As AcadBlockReference
FILENAME.text = ThisDrawing.FullName
LAYOUT.text = ThisDrawing.ActiveLayout.NAME
On Error GoTo QUITAPP
For Each obj In ThisDrawing.paperspace
            If TypeOf obj Is AcadBlockReference Then
            Set BlkRef = obj
                If BlkRef.HasAttributes Then
                    AttArray = BlkRef.GetAttributes
                    For i = LBound(AttArray) To UBound(AttArray)
                    If AttArray(i).TagString = "TYPE_OF_DWG" Then
                       DESCRIPTION.text = AttArray(i).textString
                    End If
                    Next i
                    For i = LBound(AttArray) To UBound(AttArray)
                    If AttArray(i).TagString = "JOB_NUMBER" Then
                       
                        DWG_NO.text = AttArray(i).textString
                    End If
                    Next i
                    For i = LBound(AttArray) To UBound(AttArray)
                    If AttArray(i).TagString = "LOCATION" Then
                       
                        LOCATION.text = AttArray(i).textString
                    End If
                    Next i
                    For i = LBound(AttArray) To UBound(AttArray)
                    If AttArray(i).TagString = "ITEM_#/CODE" Then
                       
                        ITM_CODE.text = AttArray(i).textString
                    End If
                    Next i
                    For i = LBound(AttArray) To UBound(AttArray)
                    If AttArray(i).TagString = "LOCATION" Then
                       
                        LOCATION.text = AttArray(i).textString
                    End If
                    Next i
                   
                   
                End If
        End If
    Next
QUITAPP:
End Sub
0
 
LVL 10

Expert Comment

by:norrin_radd
ID: 16994075
hey stephen,
did you ever get anywhere on this one?
0
 
LVL 1

Author Comment

by:stephenlecomptejr
ID: 17133115
Hey Norrin - is there anyway I can convert the above code to give me the object name?  something that will print me a listing of all TypeOf for obj?  like:

On Error GoTo QUITAPP
For Each obj In ThisDrawing.paperspace
            Debug.Print obj.TypeOf

Next
0
 
LVL 10

Expert Comment

by:norrin_radd
ID: 17146078
I'm sure there is a way. Might have to send the typeof to a txt file or something like thay. I'll try to look at it when I can, been kinda hard to do any extra curricular stuff lately, but I'll try. ;)

did you ever get anywhere on your original question? when you say tool palettes you are talking about blocks that are pulled from tool palettes right?

did you try the attribute extractor to see if that will give you what you need?
0
 
LVL 1

Author Comment

by:stephenlecomptejr
ID: 17158698
yea - that's the thing that is so confusing.
People keep correcting me that they are objects not blocks that are being pulled from the tool palette.
And I don't think they (objects) pull up the same as blocks with attributes.
I'll try the attribute extractor sometime next week but I have before and it hasn't worked since its again not a block with attributes but rather an object assigned to a "space" with properties that I would like to assign to a database.
I really wish you had ADT 2006.

Thanks for your help - norrin thus far.
I appreciate all your replies.
0
 
LVL 10

Accepted Solution

by:
norrin_radd earned 2000 total points
ID: 17195249
Yeah I wish I had adt too. That's a new issue to me (the adt objects thing). But you might try looking for a adt developers help file, I know Map has some dev help files that give a little, very little, insight on how to access ACMap things in vba. Sorry I havent been able to devote much time to any prog's lately.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If, like me, you find yourself repeatedly and tediously joining many segments (lines, arcs) in other people's drawings back into polylines that can be used more effectively in Computer Aided Machining and Laser Cutting, then this article is for you!…
The following article will describe how to add/edit a dimension style through AutoCAD VBA. AutoCAD VBA has its quirks and when it comes to dimensions and controlling how they look through VBA.  This is where AutoCAD can be vividly confusing. The…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Screencast - Getting to Know the Pipeline
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question