Results 1 to 18 of 18

Thread: Mscomm1.output problem when i click cut button its shown invalid property value error

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2015
    Posts
    22

    Mscomm1.output problem when i click cut button its shown invalid property value error

    my application is connected with mscomm1 but when i give output its shown error
    run time error 380
    invalid property value
    my code is here
    Option Explicit



    Private Sub chkProgress_Click()
    VectorPreview1.ShowProgress = CBool(chkProgress.Value)
    End Sub

    Private Sub chkRender_Click()
    VectorPreview1.Rendered = CBool(chkRender.Value)
    End Sub


    Private Sub chkTransparent_Click()
    If chkTransparent.Value = 0 Then
    VectorPreview1.Transparent = 255
    Else
    VectorPreview1.Transparent = 100
    End If
    End Sub


    Private Sub Command1_Click()
    Dim fName As String

    CDialog1.Filter = "Compatible Vectors Files|*.plt;*.eps;*.ai"
    CDialog1.ShowOpen

    fName = CDialog1.FileName

    If Len(fName) > 0 Then
    VectorPreview1.OpenVectorFile fName
    End If
    End Sub


    Private Sub Command2_Click()
    VectorPreview1.SaveImage App.Path & "\Test.bmp"
    MsgBox "saved as " & App.Path & "\Test.bmp"
    End Sub


    Private Sub Command3_Click()
    MSComm1.Output = VectorPreview1.Object

    End Sub

    Private Sub Form_Load()
    Form1.Caption = "App2"
    With MSComm1
    '.PortOpen = True
    .CommPort = 1
    .Handshaking = 2 - comRTS
    .RThreshold = 1
    .RTSEnable = True
    .Settings = "9600,n,8,1"
    .SThreshold = 1
    .PortOpen = True
    ' Leave all other settings as default values.
    End With


    End Sub

    Private Sub OpDraw_Click(Index As Integer)
    VectorPreview1.DrawMode = Index
    End Sub




    where as vectorpreview is .eps file preview
    my code connected with rts plotter but when i give output its shown error
    i just need to cut my plotter with given vectorpreview1 with mscomm1.output
    which property is valid for
    mscomm1.output

  2. #2
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,053

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    [...]
    Last edited by dz32; Apr 26th, 2019 at 11:27 AM.

  3. #3
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    which line gives you that error?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jul 2015
    Posts
    22

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    hy dude i have right COM port opened, its shown open and connected, only i learn to know that how to give output to my "vectorpreview1" object which contain a vector file.
    i want to learn to cut my plotter image contain inside vectorpreview object
    thanks in advance

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    .Output takes a Variant containing either a String or a Byte array.

    If you use a String, the data is taken as Unicode characters, translated to ANSI characters using the current codepage, and then sent.

    If you use a Byte array the raw binary bytes are sent.

    Nothing else can be used.

    Remarks

    The Output property can transmit text data or binary data. To send text data using the Output property, you must specify a Variant that contains a string. To send binary data, you must pass a Variant which contains a byte array to the Output property.

    Normally, if you are sending an ANSI string to an application, you can send it as text data. If you have data that contains embedded control characters, Null characters, etc., then you will want to pass it as binary data.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jul 2015
    Posts
    22

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    Name:  2.jpg
Views: 433
Size:  50.3 KBName:  3.jpg
Views: 366
Size:  33.3 KB
    hy dude dilettante

    this is my preview i want to learn how to send output
    when i send mscomm1.output = ???????

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    Consult the documentation for this "VectorPreview" control or try the vendor's support forum.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Jul 2015
    Posts
    22

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    i am making my own project, vendor have no forum, i need to learn

  9. #9
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,053

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    [...]
    Last edited by dz32; Apr 26th, 2019 at 11:27 AM.

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Jul 2015
    Posts
    22

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    how i convert first to binary code or text strings
    then i send the submission to plotter

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Jul 2015
    Posts
    22

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    vector image convertable into binary code or text stings???
    if yes then how to convert

  12. #12
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    I suspect that there's either a language or comprehension gap or possibly both happening here. Knowing how to output binary data via MSComm is the least of your hurdles.

    MSComm topics that involve control of an external device cannot be resolved without the manufactures SDK. You haven't even provided the make and model number of your plotter. We've had many MSComm topics where the OP said they couldn't find an SDK or any tech data for their device. Yet others here did.

    So how about the manufacturer, model and serial number?

    Chris
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  13. #13

    Thread Starter
    Junior Member
    Join Date
    Jul 2015
    Posts
    22

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    hy charis
    thanks for the info the plotter is REDSAIL china base company
    i think first convert vector into binary code and then plotter should accept the binary code????

  14. #14
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    There's definitely a Struther Martin situation here. Find your product and post it. RedSail (HF Laser,com)
    BTW you didn't correct me or others when we thought your device was a Plotter. It appears to be a laser cutter. That would have been nice to know in your first post. So far getting pertinent information has been like pulling teeth!

    Chris
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  15. #15
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    In the event that your unable to navigate to their Support page here it is ... RedSail Support

    Chris
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  16. #16

    Thread Starter
    Junior Member
    Join Date
    Jul 2015
    Posts
    22

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    i my case its not laser cutter its plotter cutter, my simple question Chris is that. can we convert vector into binary code first???? if this possible than maybe binary code send command cutting plotter

  17. #17
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    Quote Originally Posted by dilettante View Post
    Consult the documentation for this "VectorPreview" control or try the vendor's support forum.
    Is there a reason you haven't followed Dilettante's advice?? There's a host of 3rd party software listed on their site.

    Chris
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  18. #18
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: Mscomm1.output problem when i click cut button its shown invalid property value e

    Quote Originally Posted by shobi555 View Post
    i my case its not laser cutter its plotter cutter, my simple question Chris is that. can we convert vector into binary code first???? if this possible than maybe binary code send command cutting plotter
    Did you read dz32's post?

    Quote Originally Posted by dz32 View Post
    you need to understand what the plotter expects to receive over the serial port.

    If the plotter vendor does not have any spec sheets or help documents then
    you are going to have to watch what it is receiving from the vendor supplied program
    as it writes data to the device.

    Once you have a data capture, then you would have to understand what the data means
    then try to replicate it.

    It will probably be a long hard process that no one can assist you with
    except other users of the plotter who physically have one to work with.
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width