Author Topic: Automating Dimensioning a Single Point's Location from 0,0,0  (Read 3042 times)

0 Members and 1 Guest are viewing this topic.

Humbertogo

  • Guest
Automating Dimensioning a Single Point's Location from 0,0,0
« on: April 05, 2006, 12:42:12 PM »
Automating Dimensioning a Single Point's Location from 0,0,0

I am trying to automate dimensioning a Single Point's Location
I want to dimension a single point relative to  0,0,0


Any help would be greatfully appreciated.



Bryco

  • Water Moccasin
  • Posts: 1883
Re: Automating Dimensioning a Single Point's Location from 0,0,0
« Reply #1 on: April 05, 2006, 12:54:06 PM »
What kind of dimension do you want to use?

Humbertogo

  • Guest
Re: Automating Dimensioning a Single Point's Location from 0,0,0
« Reply #2 on: April 05, 2006, 01:05:20 PM »
AcadDimRotated

joseguia

  • Guest
Re: Automating Dimensioning a Single Point's Location from 0,0,0
« Reply #3 on: April 05, 2006, 01:14:34 PM »
so what kind of problem are you having? Where are you stuck?

Humbertogo

  • Guest
Re: Automating Dimensioning a Single Point's Location from 0,0,0
« Reply #4 on: April 05, 2006, 01:20:43 PM »
I don't any idea how to starting :-D at the moment i think i have brain dead :realmad:

joseguia

  • Guest
Re: Automating Dimensioning a Single Point's Location from 0,0,0
« Reply #5 on: April 05, 2006, 01:30:20 PM »
Straight from F1-University

Code: [Select]


Sub Example_AddDimRotated()
    ' This example creates a rotated dimension in model space.
       
    Dim dimObj As AcadDimRotated
    Dim point1(0 To 2) As Double
    Dim point2(0 To 2) As Double
    Dim location(0 To 2) As Double
    Dim rotAngle As Double
   
    ' Define the dimension
    point1(0) = 0#: point1(1) = 0#: point1(2) = 0#


    'Use CODE to Find out where the Second POINT should go
    point2(0) = 5#: point2(1) = 5#: point2(2) = 0#


    location(0) = 0#: location(1) = 5#: location(2) = 0#
    rotAngle = 0 '(or the angle you want)
    rotAngle = rotAngle * 3.141592 / 180#       ' covert to Radians
   
    ' Create the rotated dimension in model space
    Set dimObj = ThisDrawing.ModelSpace.AddDimRotated(point1, point2, location, rotAngle)
    ZoomAll
End Sub


« Last Edit: April 05, 2006, 01:36:54 PM by joseguia »

CADaver

  • Guest
Re: Automating Dimensioning a Single Point's Location from 0,0,0
« Reply #6 on: April 05, 2006, 01:51:17 PM »
Is there some reason you don't want to use ORDINATE dims? or is this a programming exercise?

Humbertogo

  • Guest
Re: Automating Dimensioning a Single Point's Location from 0,0,0
« Reply #7 on: April 05, 2006, 03:13:00 PM »
Thank  i know again  :-D
I forgot to  convert the two point to an angel :-D