Results 1 to 2 of 2

Thread: Type mismatch problem, please help

  1. #1
    Jim Guest

    Type mismatch problem, please help

    Could someone please take a look at this code exerpt and tell why I am
    getting a Compile error: 'can't assign to array' with LoopStartPt
    highlighted? Thanks.


    'Globals for this module
    Dim tubeSeed As AcadEntity
    Dim LoopStartPt(0 To 1) As Double

    Public Sub StPoint()

    LoopStartPt = tStartPt(tubeSeed)

    End Sub


    Public Function tStartPt(tubeSeg As AcadEntity) As Double()
    Dim Pt As Variant
    Dim rtnPt(0 To 1) As Double

    Dim Index As Integer

    Select Case tubeSeg.ObjectName

    Case Is = "AcDbPolyline"
    Pt = tubeSeg.Coordinates
    If IsArray(Pt) Then
    rtnPt(0) = Pt(0)
    rtnPt(1) = Pt(1)
    End If

    Case Is = "AcDbLine"
    Pt = tubeSeg.StartPoint
    rtnPt(0) = Pt(0)
    rtnPt(1) = Pt(1)

    Case Is = "AcDbArc"
    Pt = acEntity.StartPoint
    rtnPt(0) = Pt(0)
    rtnPt(1) = Pt(1)

    End Select
    tStartPt = rtnPt

    End Function

  2. #2
    Wyatt Earp Guest
    LoopStartPt = tStartPt(tubeSeed)

    tStartPt returns a double
    LoopStartPt is an array
    tStartPt either needs to return an array, or LoopStartPt needs an
    indexer.

Similar Threads

  1. Replies: 1
    Last Post: 10-25-2005, 01:10 PM
  2. Replies: 5
    Last Post: 09-23-2005, 05:10 AM
  3. Type mismatch error
    By doug k in forum VBA
    Replies: 2
    Last Post: 03-16-2005, 12:09 PM
  4. Document mismatch problems with SDI=0 mode
    By Steve Adams in forum Customization
    Replies: 0
    Last Post: 01-24-2005, 09:07 PM
  5. How to set process/mismatch parameters in Ocean?
    By Sylvio Triebel in forum Cadence
    Replies: 4
    Last Post: 10-08-2004, 08:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum