Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help converting VBA to VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00293109
Message ID:
00294045
Vues:
22
Nevermind, Roi. Apparently I was getting up when the first block encountered had no attributes, so the line crashed - probably just returning a null value instead of an array.

I fixed it with:
IF Entity.EntityType = 7 AND Entity.HasAttributes

Thanks LOADS for your help! We're architects, too - hope I can help you in future as much as you have helped me today.

Ciao.
Michael

>Hi Michael,
>
>I don't really have an answer for you. I know what is happening though. The selection is not honoring the filter (you are getting _everything_ in the drawing and not just inserts name 'DOOR'. I can't figure out how to pass the arrays to the ssnew.SELECT method properly.
>
>A really crappy (and I mean this sucks bigtime) work around is to change the for loop to:
>
>
** Spin through the selset
>FOR EACH Entity IN ssnew
>	IF Entity.EntityType = 7 && are you an insert?
>		attribs = Entity.GetAttributes
>		** spin through the attribute collection of the insert.
>		FOR I = 1 TO ALEN(attribs)
>			? attribs(I).TagString + "=" + attribs(I).TextString
>		NEXT
>	ENDIF
>NEXT
>The if just tests to make sure it's an insert. MUCHO PROBLEMO, on a large drawing you will be looping every entity in the .dwg not just the inserts you want.
>
>Check out Autodesks news groups. adesknews.autodesk.com is the server. Look for the autodesk.autocad.customization.vba group. Someone there may have an idea why the ssnew.SELECT is not filtering properly. I did learn that the aKey array has to be declared as an INTEGER but I still couldn't get it to work :(
>
>Sorry I couldn't be of much more help.
>
>>Thanks Roi (nice photo).
>
>Hehe, that's what working with architects does to you :-)
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform