-
Nov 11th, 2017, 05:38 AM
#1
Thread Starter
Junior Member
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
-
Nov 11th, 2017, 06:54 AM
#2
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.
-
Nov 11th, 2017, 06:54 AM
#3
Re: Mscomm1.output problem when i click cut button its shown invalid property value e
which line gives you that error?
-
Nov 11th, 2017, 07:48 AM
#4
Thread Starter
Junior Member
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
-
Nov 11th, 2017, 08:06 AM
#5
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.
-
Nov 11th, 2017, 08:43 AM
#6
Thread Starter
Junior Member
Re: Mscomm1.output problem when i click cut button its shown invalid property value e
hy dude dilettante
this is my preview i want to learn how to send output
when i send mscomm1.output = ???????
-
Nov 11th, 2017, 08:52 AM
#7
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.
-
Nov 11th, 2017, 08:59 AM
#8
Thread Starter
Junior Member
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
-
Nov 11th, 2017, 10:56 AM
#9
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.
-
Nov 13th, 2017, 02:40 AM
#10
Thread Starter
Junior Member
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
-
Nov 13th, 2017, 02:41 AM
#11
Thread Starter
Junior Member
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
-
Nov 13th, 2017, 10:48 AM
#12
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??
-
Nov 15th, 2017, 04:05 AM
#13
Thread Starter
Junior Member
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????
-
Nov 15th, 2017, 01:15 PM
#14
-
Nov 15th, 2017, 01:20 PM
#15
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??
-
Nov 17th, 2017, 03:06 AM
#16
Thread Starter
Junior Member
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
-
Nov 17th, 2017, 08:12 AM
#17
Re: Mscomm1.output problem when i click cut button its shown invalid property value e
Originally Posted by dilettante
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??
-
Nov 17th, 2017, 08:21 AM
#18
Re: Mscomm1.output problem when i click cut button its shown invalid property value e
Originally Posted by shobi555
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?
Originally Posted by dz32
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|