VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Blockname lowercase?

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
239 Views, 5 Replies

Blockname lowercase?

Hi
is this standard in A2K , that a block name is in lowercase letters

Set myObj = ThisDrawing.HandleToObject(returnObj.Handle)
myObj.Name

in Acad14 this was in Uppercase?

Regards
Erich
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

Erich,

Allowing mixed case is one of the new features of A2K. The
EXTNAMES system variable can be used to revert to the R14
behavior on a per drawing basis.

Mark Holder

Erich Heiz wrote:
>
> Hi
> is this standard in A2K , that a block name is in lowercase letters
>
> Set myObj = ThisDrawing.HandleToObject(returnObj.Handle)
> myObj.Name
>
> in Acad14 this was in Uppercase?
>
> Regards
> Erich
Message 3 of 6
Anonymous
in reply to: Anonymous

Mark,

Extnames does not any change on this strange behavior.
The name of the block on the harddisk is in uppercase.
After the manipulation through VBA (insert, write to attributes) in the
blocktable the name is in lowercase.
I do not any Ucase or Lcase in my code.
I got some minor problems when i search in the table for an existing block,
thats all.
So i can use Ucase or Lcase for my search (copmare two string), thats not a
problem.
I simply dont like when some undocumented transformations are done?!

Erich Heiz

"Mark Holder" schrieb im Newsbeitrag
news:38FEFA02.E618978A@atscorporation.com...
> Erich,
>
> Allowing mixed case is one of the new features of A2K. The
> EXTNAMES system variable can be used to revert to the R14
> behavior on a per drawing basis.
>
> Mark Holder
>
> Erich Heiz wrote:
> >
> > Hi
> > is this standard in A2K , that a block name is in lowercase letters
> >
> > Set myObj = ThisDrawing.HandleToObject(returnObj.Handle)
> > myObj.Name
> >
> > in Acad14 this was in Uppercase?
> >
> > Regards
> > Erich
Message 4 of 6
Anonymous
in reply to: Anonymous

Erich-

I did not check for block names specifically, but it does
work for layer names, and the docs imply it applies to all
of the tables. I did a test, and setting the variable does
seem to make new table entries (including blocks) conform to
r14 specs, but does not change existing entries. Drawings
that already have mixed case names will have to be fixed
manually or with code.

Mark Holder

Erich Heiz wrote:
>
> Mark,
>
> Extnames does not any change on this strange behavior.
> The name of the block on the harddisk is in uppercase.
> After the manipulation through VBA (insert, write to attributes) in the
> blocktable the name is in lowercase.
> I do not any Ucase or Lcase in my code.
> I got some minor problems when i search in the table for an existing block,
> thats all.
> So i can use Ucase or Lcase for my search (copmare two string), thats not a
> problem.
> I simply dont like when some undocumented transformations are done?!
>
> Erich Heiz
>
> "Mark Holder" schrieb im Newsbeitrag
> news:38FEFA02.E618978A@atscorporation.com...
> > Erich,
> >
> > Allowing mixed case is one of the new features of A2K. The
> > EXTNAMES system variable can be used to revert to the R14
> > behavior on a per drawing basis.
> >
> > Mark Holder
> >
> > Erich Heiz wrote:
> > >
> > > Hi
> > > is this standard in A2K , that a block name is in lowercase letters
> > >
> > > Set myObj = ThisDrawing.HandleToObject(returnObj.Handle)
> > > myObj.Name
> > >
> > > in Acad14 this was in Uppercase?
> > >
> > > Regards
> > > Erich
Message 4 of 6
mnerren
in reply to: Anonymous

In all cases where I deal with string values obtained from autocad entities, whether it be block names, attribute tags,
layer names, whatever, I *always* explicitely convert the strings to ucase for any comparisons. I use ucase liberally, just
to make sure I am always dealing with the correct string comparisons.

Micah
Message 6 of 6
Anonymous
in reply to: Anonymous

From the Visual Basic Help Files of VB Design http://vbdesign.hypermart.net/

Hi Erich, Micah, Mark,

If you feel that while comparing text strings case is NEVER going to be
important add this to the general declarations of your module (before any
procedures)

Option Compare Text

It forces VBA to use the local settings of your system for sorting and is
case insensitive ( A = a )

Randall Rath
VB Design

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost