Problems with vba

Feb 19, 2004 1 Replies

Hello I try to send object property as argument to a function in vba this function must sort objects by "LAYER" or "COLOR" but i don't know how to use this argument in the function



Public Function tri_par ( Aray , value) For i = 1 To UBound (aray) .............. .......... objprop = objent.value (where value is equal to "LAYER" or "COLOR") doesn't seems to be right



if it isn't possible, Is there a command that accept dxf code as argument ? That irritates me, if I succeeded not, I go back in Lisp



Thank you to help me.


Can this example help?

Sub MakeRed() Set R = ThisDrawing.Layers.Add("Red layer") R.Color = acRed Dim element as AcadEntity For Each element in ThisDrawing.ModelSpace If element.Color = acRed Then element.Color = acByLayer element.Layer = "Red Layer" end if Next Element End Sub

kr Ben

"Cbt Bloy" schreef in bericht news:c122fn$r4a$ snipped-for-privacy@s1.read.news.oleane.net...

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required