Author Topic: coordinates of 3dface  (Read 3302 times)

0 Members and 1 Guest are viewing this topic.

sbattina

  • Guest
coordinates of 3dface
« 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

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16716
  • Superior Stupidity at its best
coordinates of 3dface
« Reply #1 on: April 06, 2004, 01:41:26 PM »
Are the points of the 3dface coplanar. If not then you will not be able to produce a region with them.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

sbattina

  • Guest
coordinates of 3dface
« Reply #2 on: April 06, 2004, 03:22:52 PM »
Quote

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.

sbattina

  • Guest
coordinates of 3dface
« Reply #3 on: April 06, 2004, 03:55:11 PM »
Quote
Set Vpoints = objEnt.Coordinates


I also used "set".......shouldnt have!!

lemme try it all again

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16716
  • Superior Stupidity at its best
coordinates of 3dface
« Reply #4 on: April 06, 2004, 03:55:44 PM »
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.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

sbattina

  • Guest
coordinates of 3dface
« Reply #5 on: April 06, 2004, 04:23:44 PM »
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??

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16716
  • Superior Stupidity at its best
coordinates of 3dface
« Reply #6 on: April 06, 2004, 04:43:15 PM »
I have a VBA resource I will share...let me know..
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

sbattina

  • Guest
coordinates of 3dface
« Reply #7 on: April 06, 2004, 06:44:27 PM »
where is it Keith??.........

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16716
  • Superior Stupidity at its best
coordinates of 3dface
« Reply #8 on: April 06, 2004, 07:16:06 PM »
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.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal