Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

How to separate bloks?

Status
Not open for further replies.

spown

Electrical
May 28, 2005
9
I use VBA to create block with attributes, but Autocad Map 2000 mixed new one with old one. What can I do?
 
Replies continue below

Recommended for you

Could you redescribe what is happening?

"Everybody is ignorant, only on different subjects." — Will Rogers
 
I create block with
Set blockTablo = ThisDrawing.Blocks.Add(insertPoint, blockName)
Then I add attributes.
Set blockTabloAttrib = blockTablo.AddAttribute(0.15, mode, "òðàôîïîñò", blockPoint, "ÒÏ", attrTrafopost)
All of source is working fine until now. The new block gets a part of old one. And the attributes are mixed. The value of attributes are written in cyrillic.
 
When you do this, I think you are redefining the BlockReference in the drawing. Are you inserting a block that is already in the drawing? If you are, and you try to add an attribute, you are redefining the Block Object. Being a database (AutoCAD that is), it will redefine the entry the way Autodesk programmed it to. When you add the block, could you give the block its own unique name? That will allow it to be defined differently from existing blocks. I hope I am making sense.

"Everybody is ignorant, only on different subjects." — Will Rogers
 
i give the block name using the following source
ObjectCount = ThisDrawing.Blocks.count
blockName = "ELTABLO_" + Str(ObjectCount + 1)
end it was worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor