Problems with vba

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.
Reply to
Cbt Bloy
Loading thread data ...
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$
Reply to

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.