TheSwamp
Code Red => VB(A) => Topic started by: sbattina on April 05, 2004, 10:37:12 PM
-
Can anyone tell me why this code does not work. Infact I tried VarType(Vpoints) . It returns a '0' value....which I presume is Uninitialized values. I also tried assigning ObjEnt to another variable as a 3dface. both ways, It does not give an error...error but its does not give me the region.
Where am I wrong?
For Each objEnt In ThisDrawing.ModelSpace
If TypeOf objEnt Is Acad3DFace Then
objEnt.color = acCyan
objEnt.Layer = "ABC"
Set Vpoints = objEnt.Coordinates
Set region = ThisDrawing.ModelSpace.AddRegion(Vpoints)
region.color = acBlue
End If
Next objEnt
-
Are the points of the 3dface coplanar. If not then you will not be able to produce a region with them.
-
RetVal = object.AddRegion(ObjectList)
ObjectList - Array of Objects
The array of objects forming the closed coplanar face to be made into a region. This array may contain the following object types: Line, Arc, Circle, Elliptical Arc, LightweightPolyline, Spline.
I found out last night about region. Doesnt take points :roll: .
But have no idea why I dont get .coordinates.
hmmm..yes they are coplanar.
-
Set Vpoints = objEnt.Coordinates
I also used "set".......shouldnt have!!
lemme try it all again
-
I should have realized that as well...
A quick check will reveal there is no "coordinates" property of a region, probably because a region can have multiple shaped segments, such as arcs, circles, splines and ellipses.
If you need to get the coordinates, you could explode the region, extract the coordinates of the resultant explode, then region the entities again.
-
I am trying to find the coordinates of 3dfaces in a selection set. I thought it would be simple enough with the ".coordinates" property.
It wasnt giving an error... I was using a on error resume next earlier in the subroutine.........another silly thing to do I guess.
autocad That I have at home does not have a developers help.....is there any online??
-
I have a VBA resource I will share...let me know..
-
where is it Keith??.........
-
It is too big to email, if you PM me your email address I will send you a link where you can download it along with some resources.