CADopia Site

Download

  • You may download the software from CADopia's web site at www.cadopia.com.

Recent Comments

May 2008

Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Thursday, May 15, 2008

CADopia - SelectAtPoint method

     Member of CADopia.SelectionSet

     Selects objects passing through a point, and adds them to the SelectionSet.

Syntax

object. SelectAtPoint(Point, [FilterType], [FilterData])

Where:

     object is a SelectionSet object;

     Point is a CADopia Point object specifying the point to use for selection;

     FilterType is an optional parameter for specifying how to filter data selection;

     FilterData is an optional parameter for specifying filter data.

CADopia - Select method

Selects objects within the rectangle specified by two points, and adds them to the SelectionSet.

Syntax

object.Select(Type, [Point1], [Point2], [FilterType], [FilterData])

Where:

     object is a SelectionSet object;

     Type is one of the following SelectionSetType constants corresponding to the various selection modes:

     vicSelectionSetAll = 11

     vicSelectionSetCrossingCircle = 3

     vicSelectionSetCrossingPolygon = 0

     vicSelectionSetCrossingWindow = 6

     vicSelectionSetFence = 12

     vicSelectionSetInsideCircle = 5

     vicSelectionSetInsidePolygon = 2

     vicSelectionSetInsideWindow = 8

     vicSelectionSetLast = 10

     vicSelectionSetOutsideCircle = 4

     vicSelectionSetOutsidePolygon = 1

     vicSelectionSetOutsideWindow = 7

     vicSelectionSetPrevious = 9

     Point1 and Point2 are CADopia Point objects defining a rectangle for those applicable selection modes;

     FilterType is an optional parameter for specifying how to filter data selection;

     FilterData is an optional parameter for specifying filter data.

Monday, May 12, 2008

CADopia - Scroll method

Scrolls the window horizontally, vertically or both.

Syntax

object.Scroll(FlagsX, FlagsY)

Where:

     object is a CADopia Window object;

     FlagsX controls horizontal scrolling with one of the following CADopia constants:

     vicScrollLeft = 0

     vicScrollLeftPage = 2

     vicScrollNoneX = 9

     vicScrollRight = 1

     vicScrollRightPage = 3

     vicScrollToLeft = 6

     vicScrollToRight = 7

FlagsY controls vertical scrolling with one of the following CADopia constants:

     vicScrollDown = 1

     vicScrollDownPage = 3

     vicScrollNoneY = 9

     vicScrollToBottom = 7

     vicScrollToTop = 6

     vicScrollUp = 0

     vicScrollUpPage = 2

CADopia - ScaleEntity method

Scales the entity or members of a selection set by a given scale factor.

Syntax

object.ScaleEntity(BasePoint, ScaleFactor)

Where:

     object is a CADopia entity;

     BasePoint is a CADopia Point object representing the point about which the entity will be scaled;

     ScaleFactor is a double-precision variable (or value) representing the factor by which to scale the entity or entities.

Thursday, May 08, 2008

CADopia - RunScript method

Runs a specified script file.

Syntax

Sub RunScript(ScriptName)

Where:

     ScriptName is a string variable representing the name of the script file.

ScaleEntity method

Scales the entity or members of a selection set by a given scale factor.

Syntax

object.ScaleEntity(BasePoint, ScaleFactor)

Where:

     object is a CADopia entity;

     BasePoint is a CADopia Point object representing the point about which the entity will be scaled;

     ScaleFactor is a double-precision variable (or value) representing the factor by which to scale the entity or entities.

CADopia - RunCommand method

Executes a CADopia command as if it were typed in the command line.

Syntax

Sub RunCommand(Command)

Where:

      Command is a string variable representing the name of a CADopia command.

RunCommand method example

Monday, May 05, 2008

CADopia - RunCommand method

Executes a CADopia command as if it were typed in the command line.

Syntax

Sub RunCommand(Command)

Where:

      Command is a string variable representing the name of a CADopia command.

RunCommand method example

CADopia - Rotate3D method

Rotates the selection set and all its members about an axis formed by two points. The direction of the axis is from point1 to point2.

Syntax

object.Rotate3D(Point1, Point2, RotationAngle)

Where:

     object is a CADopia entity;

     Point1 is a CADopia Point object representing the first point of the axis about which objects will be rotated;

     Point2 is a CADopia Point object representing the second point of the axis about which objects will be rotated;

     RotationAngle is a double-precision variable (or value) representing the angle in radians.

Rotate3D method example

Private Sub Rotate3D_Example()

     ' This example creates a cone in model space.

     ' It then rotates the cone about an axis.

         

     Dim coneObj As CADopia.PolygonMesh

     Dim rotateConeObj As CADopia.PolygonMesh

     Dim conePt As CADopia.Point

     Dim rotPt1 As CADopia.Point

     Dim rotPt2 As CADopia.Point

     Set conePt = Library.CreatePoint(2, 2, 0)

     Set rotPt1 = Library.CreatePoint(1, 2, 0)

     Set rotPt2 = Library.CreatePoint(3, 4, 0)

     Set coneObj = ThisDocument.ModelSpace.AddCone(conePt, 3, 4)

     coneObj.Update

    

     ' Rotate the cone

     coneObj.Rotate3D rotPt1, rotPt2, 10

     ThisDocument.ActiveViewport.ZoomAll

End Sub

Thursday, May 01, 2008

CADopia - Rotate method

Rotates an object or selection set.

Syntax

object.Rotate(BasePoint, RotationAngle)

Where:

     object is a CADopia entity;

     BasePoint is a CADopia Point object representing the point about which objects will be rotated;

     RotationAngle is a double-precision variable (or value) representing the angle in radians.

Copy method example

Private Sub Copy_and_Rotate_Example()

     ' This example creates a line and then copies it.

     ' The new line is then rotated 10 radians.

         

     ' Create the line

     Dim myDoc As CADopia.Document

     Dim myLine As CADopia.Line

     Dim myStartPt As CADopia.Point

     Dim myEndPt As CADopia.Point

     Set myDoc = Application.ActiveDocument

     Set myStartPt = Library.CreatePoint(4, 4)

     Set myEndPt = Library.CreatePoint(7, 3)

     Set myLine = myDoc.ModelSpace.AddLine(myStartPt, myEndPt)

     myLine.Update

     ' Copy and rotate the line

     Dim copymyLine As CADopia.Line

     Set copymyLine = myLine.Copy()

     copymyLine.Rotate myStartPt, 10

     MsgBox "Rotated the copied line 10 radians."

     ThisDocument.ActiveViewport.ZoomExtents

End Sub

CADopia - RemoveItems method

Sub RemoveItems(Entities)

Removes one or more entities from the SelectionSet.

Syntax

object.RemoveItems(Entities)

Where:

     object is a Block or SelectionSet object;

     Entities is a selection set object to which the items are to be added.

RemoveItems method example

Private Sub RemoveItemsExample()

' This example creates a selection set, and a line and circle objects.

' It then adds the objects to the selection set and removes them.

    

     Dim ssetObj As CADopia.SelectionSet

     Dim I As Integer

     Dim lineObj As CADopia.Line

     Dim startPoint As CADopia.Point

     Dim endPoint As CADopia.Point

     Dim circObj As CADopia.Circle

     Dim centerPt As CADopia.Point

     Dim radius As Double

     Dim ssetName

     ssetName = InputBox("Type a name for the selection set:")

     Set ssetObj = ThisDocument.SelectionSets.Add(ssetName)

         

     ' Create a line object in model space

     Set startPoint = Library.CreatePoint(3, 1, 0)

     Set endPoint = Library.CreatePoint(5, 5, 0)

     Set lineObj = ThisDocument.ModelSpace.AddLine(startPoint, endPoint)

    

     ' Create a circle object in model space

     Set centerPt = Library.CreatePoint(3, 1, 0)

     radius = 5

     Set circObj = ThisDocument.ModelSpace.AddCircle(centerPt, radius)

     ' Collect the objects into an array of objects

     ' to be added to the selection set.

     ReDim ssobjs(1 To ThisDocument.ModelSpace.Count) As CADopia.Entity

For I = 1 To ThisDocument.ModelSpace.Count

          Set ssobjs(I) = ThisDocument.ModelSpace.Item(I)

Next I

     ' Add the array of objects to the selection set

     ssetObj.AddItems ssobjs

     MsgBox "No. of items in sel. set = " & ssetObj.Count

     ssetObj.RemoveItems ssobjs

End Sub