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"
.
.
...
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....
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...
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?
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.
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?
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.
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...
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...
I am loading a DVB (VB Project) into an ACAD dwg. Once it is loaded, I can't Unload it. I keep getting a "invalid filename" message. I have tried using "vl-vbaunload" and "vbaunload", etc., but nothing.
So, can you unload a DVB? I know I loaded it with a VBA load command, but is the filenmae...
Might be a GenericCAD file. I think they used .CAD extensions.
Try changing the extension to DXF and see if ACAD will open it. Or are you saying that AutoCAD gave you a message that it couldn't open it?
Yeah, I figure it wasn't possible, or at least nobody has done it yet. Guess I'll have to use MText or regular Text, and first split the lines into seperate text strings in a program.
We can assume that your AutoCAD created drawings print fine, right?
If so, are the line colors in the TurboCAD converted drawings the same as you use in your AutoCAD created ones?
And are you using a Plot Style when you print? If so, is it set to the same as the ACAD created drawings?
Anybody know how to create an Attribute, and have the Text Wrap (multiple lines) if it is longer than a certain width (or number of characters)?
An example would be a Notes section. If I type notes into a "box", and the width of some string becomes to wide for one line, I want the text to...