Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by CanonShooter

  1. CanonShooter

    Delete XData

    I have searched around, and the answers I have found do not work for me. Using ACAD 2004 VBA, I have attached XData to some entities, with the application name like this: Dim DataType as Integer Dim Data as Variant DataType(0) = 1001 Data(0) = "MyApplication" . . ...
  2. CanonShooter

    Combo Box Header

    Thanks. That is about what I had figured. Of course, it stinks, but it figures ;-)
  3. CanonShooter

    Label Text Color in ACAD VBA?

    I figured it out. In the VB code, you can set the ForeColor property to something like vbRed and it will work. There is a list of the vb Colors in help. Each one has a hex color value, but they didn't work, so I used the vbColor....
  4. CanonShooter

    Label Text Color in ACAD VBA?

    In AutoCAD VBA, anyone know how to change the color of a Label? I would assume it is the ForeColor property, but when I look at the predefined choices, they are shades of gray. A look at the Palette tab in the ForeColor property, shows nothing. No colors or anything is in there. Maybe that is...
  5. CanonShooter

    Combo Box Header

    Sorry, forgot to mention I wasn't "binding" the combo box data to anything in particular. It is more or less filled in insode the code, using AddItem. So no Excel data to use. Does it have to get its data from "a table", to use the ColumnHeads property?
  6. CanonShooter

    Combo Box Header

    In VBA, a regular ole Combo Box control has a ColumnHeads property to display Column Headers (if you make it true). Is there a way to put the text in the header? If you make this property true, it puts a blank row (no text) in there at the top.
  7. CanonShooter

    Dimscale in VBA

    Why didn't I remember that? Where is the coffee? Thanks
  8. CanonShooter

    Dimscale in VBA

    Anybody know how to get the current Dimscale value from VBA? TIA
  9. CanonShooter

    MText "lines" of text

    I did the following (I guess it works all the time): Dim blockObj As AcadBlock Dim mtextObj As AcadMText Dim insertPoint(0 To 2) As Double Dim txwid As Variant Dim txht as Variant Dim txstr as String Dim minExt As Variant Dim maxExt As Variant Dim junk as Variant 'set text data insertPoint(0)...
  10. CanonShooter

    MText "lines" of text

    Any way on ACAD 2004 VBA to find the number of text lines in an MText "paragraph", or do ya just have to figure it out somehow by using the bounding box and text height?
  11. CanonShooter

    Delete Block in 2004 VBA

    Nevermind. I am working now. Since I know the name, and am working with only one block, I just kill it like the code says (DeleteRefs part). I'm good, and thanks again.
  12. CanonShooter

    Delete Block in 2004 VBA

    The only problem I still have is that the code you referenced assumes you just picked the entity (I guess). I do not want to pick it. I am currently looking in the Blocks collection, and if it is in there, delete it. Apparently I need to somehow get the actual object from the AcadBlockReference...
  13. CanonShooter

    Delete Block in 2004 VBA

    Thank you
  14. CanonShooter

    Delete Block in 2004 VBA

    I am using AutoCAD 2004, and trying to delete a block in VBA. I get an error that the block or object is referenced. In looking thru the help files, I noticed that the Blocks Collection does not have a delete function. But I don't want to delete the whole collection, just a block. Basically...
  15. CanonShooter

    DVB Won't Unload

    Yeah, that works.

Part and Inventory Search