C
Utility Library
ReferencingUtilityClasses(p.C-2)
Howtoreferencetheclassesinyour
programmingenvironment.
UtilityLibraryClasses(p.C-3)
Describestheclassesprovidedinthe
Utilitylibrary.
Enumerations(p.C-32)
Describesthesetsofconstants
providedwiththelibrary.
Convert pdf photo to text - control SDK platform:C# PDF Convert to Text SDK: Convert PDF to txt files in C#.net, ASP.NET MVC, WinForms, WPF application
C# PDF to Text (TXT) Converting Library to Convert PDF to Text
www.rasteredge.com
Convert pdf photo to text - control SDK platform:VB.NET PDF Convert to Text SDK: Convert PDF to txt files in vb.net, ASP.NET MVC, WinForms, WPF application
VB.NET Guide and Sample Codes to Convert PDF to Text in .NET Project
www.rasteredge.com
C
Utility Library
ReferencingUtilityClasses
Thissectiondescribesthe
MWComUtil
libraryprovidedwithMATLABBuilder
forExcel. Thislibraryisfreelydistributableandincludesseveralfunctions
usedinarrayprocessing,aswellastypedefinitionsusedindataconversion.
Thislibraryiscontainedinthefile
mwcomutil.dll
.Itmustberegisteredonce
oneachmachinethatusesExcelBuildercomponents.
Registerthe
MWComUtil
libraryattheDOScommandpromptwiththe
followingcommand:
mwregsvr mwcomutil.dll
The
MWComUtil
libraryincludessevenclasses(see“UtilityLibraryClasses”on
pageC-3)andthreeenumeratedtypes(see“Enumerations”onpageC-32).
Beforeusingthesetypes,youmustmakeexplicitreferencestothe
MWComUtil
typelibrariesintheVisualBasicIDE.Todothis,clickTools>References
fromthemainmenuoftheVBeditor. TheReferencesdialogboxappears
withascrollablelistofavailabletypelibraries. Fromthislist,select
MWComUtil7.5TypeLibraryandclickOK.
C-2
control SDK platform:C# PDF insert image Library: insert images into PDF in C#.net, ASP
vector images to PDF file. Import graphic picture, digital photo, signature and logo into PDF document. Ability to put image into
www.rasteredge.com
control SDK platform:VB.NET PDF insert image library: insert images into PDF in vb.net
Once the photo is inserted, its attributes, for As String = Program.RootPath + "\\" 1.pdf" Dim doc New PDFDocument(inputFilePath) ' Get a text manager from
www.rasteredge.com
UtilityLibraryClasses
UtilityLibraryClasses
TheMATLABBuilderforExcelUtilitylibraryprovidestheseclasses:
• “ClassMWUtil”onpageC-3
• “ClassMWFlags”onpageC-10
• “ClassMWStruct”onpageC-16
• “ClassMWField”onpageC-24
• “ClassMWComplex”onpageC-25
• “ClassMWSparse”onpageC-27
• “ClassMWArg”onpageC-30
ClassMWUtil
The
MWUtil
classcontainsasetofstaticutilitymethodsusedinarray
processingandapplicationinitialization.Thisclassisimplementedinternally
asasingleton(onlyoneglobalinstanceofthisclassperinstanceofExcel).It
ismostefficienttodeclareonevariableofthistypeinglobalscopewithineach
modulethatusesit. Themethodsof
MWUtil
are
• “SubMWInitApplication(pAppAsObject)”onpageC-3
• “SubMWPack(pVarArg,[Var0],[Var1],...,[Var31])”onpageC-5
• “SubMWUnpack(VarArg,[nStartAtAsLong],[bAutoResizeAsBoolean=
False],[pVar0],[pVar1],...,[pVar31])”onpageC-6
• “SubMWDate2VariantDate(pVar)”onpageC-8
ThefunctionprototypesuseVisualBasicsyntax.
SubMWInitApplication(pAppAsObject)
InitializesthelibrarywiththecurrentinstanceofExcel.
C-3
control SDK platform:VB.NET Image: Mark Photo, Image & Document with Polygon Annotation
SDK can easily generate polygon annotation on PDF file without using external PDF editing software. For example, if you want to add text annotation on your
www.rasteredge.com
control SDK platform:VB.NET Image: Image Resizer Control SDK to Resize Picture & Photo
VB.NET Image & Photo Resizing Overview. The VB.NET image drawing application to draw text & graphics powerful & profession imaging controls, PDF document, image
www.rasteredge.com
C
Utility Library
Parameters.
Argument
Type
Description
pApp
Object
Avalidreferenceto
thecurrentExcel
application
Return Value. . None.
Remarks. ThisfunctionmustbecalledonceforeachsessionofExcelthat
usesExcelBuildercomponents. Anerrorisgeneratedifamethodcallis
madetoamemberclassofanyExcelBuildercomponent,andthelibraryhas
notbeeninitialized.
Example. ThisVisualBasicsampleinitializesthe
MWComUtil
librarywith
thecurrentinstanceofExcel.Aglobalvariableoftype
Object
named
MCLUtil
holdsaninstanceofthe
MWUtil
class,andanotherglobalvariableoftype
Boolean
named
bModuleInitialized
storesthestatusoftheinitialization
process. Theprivatesubroutine
InitModule()
createsaninstanceofthe
MWComUtil
classandcallsthe
MWInitApplication
methodwithanargument
of
Application
.Oncethisfunctionsucceeds,allsubsequentcallsexitwithout
recreatingtheobject.
Dim MCLUtil As s Object
Dim bModuleInitialized d As s Boolean
Private Sub InitModule()
If Not bModuleInitialized Then
On Error GoTo Handle_Error
If MCLUtil Is Nothing Then
Set MCLUtil = CreateObject("MWComUtil.MWUtil")
End If
Call MCLUtil.MWInitApplication(Application)
bModuleInitialized = True
Exit Sub
Handle_Error:
bModuleInitialized = False
End If
End Sub
C-4
control SDK platform:VB.NET Image: Image Cropping SDK to Cut Out Image, Picture and
function from following aspects. Key functions of VB.NET image cropper control SDK; VB.NET image cropping method to crop picture / photo;
www.rasteredge.com
control SDK platform:VB.NET Image: Image Scaling SDK to Scale Picture / Photo
A 1: Using this VB.NET image scaling control SDK API, developer can only scale one image / picture / photo at a time in .NET class application.
www.rasteredge.com
UtilityLibraryClasses
SubMWPack(pVarArg,[Var0],[Var1],... ,[Var31])
Packsavariablelengthlistof
Variant
argumentsintoasingle
Variant
array.Thisfunctionistypicallyusedforcreatinga
varargin
cellfromalist
ofseparateinputs. Eachinputinthelistisaddedtothearrayonlyifitis
nonemptyandnonmissing.(InVisualBasic,amissingparameterisdenoted
bya
Variant
typeof
vbError
withavalueof
&H80020004
.)
Parameters.
Argument
Type
Description
pVarArg
Variant
Receivestheresulting
array
[Var0], [Var1], ...
Variant
Optional list of
Variant
s topack
intothearray. 0to
32argumentscanbe
passed.
Return Value. . None.
Remarks. Thisfunctionalwaysfreesthecontentsof
pVarArg
before
processingthelist.
Example. Thisexampleuses
MWPack
inaformulafunctiontoproducea
varargin
celltopassasaninputparametertoamethodcompiledfroma
MATLABfunctionwiththesignature:
function y = mysum(varargin)
y = sum([varargin{:}]);
Thefunctionreturnsthesumoftheelementsin
varargin
.Assumethatthis
functionisamethodofaclassnamed
myclass
thatisincludedinacomponent
named
mycomponent
withaversionof1.0.TheVisualBasicfunctionallows
upto10inputs,andreturnstheresult
y
. Ifanerroroccurs,thefunction
returnstheerrorstring. Thisfunctionassumesthat
MWInitApplication
hasbeenpreviouslycalled.
Function mysum(Optional V0 As Variant, , _
Optional V1 As Variant, _
C-5
control SDK platform:VB.NET Image: How to Save Image & Print Image Using VB.NET
is developed to help VB.NET programmers save & print image / photo / picture from ASP Capable of saving and printing multi-page document files, like PDF and Word
www.rasteredge.com
control SDK platform:C# Image: How to Add Antique & Vintage Effect to Image, Photo
creating control add-on is widely used in modern photo editors, which We are dedicated to provide powerful & profession imaging controls, PDF document, tiff
www.rasteredge.com
C
Utility Library
Optional V2 As Variant, _
Optional V3 As Variant, _
Optional V4 As Variant, _
Optional V5 As Variant, _
Optional V6 As Variant, _
Optional V7 As Variant, _
Optional V8 As Variant, _
Optional V9 As Variant) As Variant
Dim y As Variant
Dim varargin As Variant
Dim aClass As Object
Dim aUtil l As s Object
On Error Goto o Handle_Error
Set aClass s = = CreateObject("mycomponent.myclass.1_0")
Set aUtil = CreateObject("MWComUtil.MWUtil")
Call aUtil.MWPack(varargin,V0,V1,V2,V3,V4,V5,V6,V7,V8,V9)
Call aClass.mysum(1, y, , varargin)
mysum = = y
Exit Function
Handle_Error:
mysum = = Err.Description
End Function
SubMWUnpack(VarArg,[nStartAtAsLong],[bAutoResizeAs
Boolean=False],[pVar0],[pVar1],...,[pVar31])
Unpacksanarrayof
Variant
sintoindividual
Variant
arguments. This
functionprovidesthereversefunctionalityof
MWPack
andistypicallyusedto
processa
varargout
cellintoindividual
Variant
s.
Parameters.
Argument
Type
Description
VarArg
Variant
Inputarrayof
Variant
s
tobeprocessed
C-6
control SDK platform:C# PDF remove image library: remove, delete images from PDF in C#.
NET delete PDF pages, VB.NET convert PDF to SVG. vector image, graphic picture, digital photo, scanned signature remove multiple or all images from PDF document.
www.rasteredge.com
control SDK platform:VB.NET PDF remove image library: remove, delete images from PDF in
PDF to text, C#.NET convert PDF to images image, graphic picture, digital photo, scanned signature Except PDF text processing function, RasterEdge XDoc.PDF for
www.rasteredge.com
UtilityLibraryClasses
Argument
Type
Description
nStartAt
Long
Optional starting
index (zero-based)
inthearraytobegin
processing.Default=
0
.
bAutoResize
Boolean
Optionalauto-resize
flag. Ifthisflagis
True
,anyExcelrange
output arguments
areresizedtofitthe
dimensions of the
Variant
tobecopied.
Theresizingprocessis
appliedrelativetothe
upper-leftcornerofthe
suppliedrange.Default
=
False
.
[pVar0],[pVar1],
...
Variant
Optional list of
Variant
storeceivethe
arrayitemscontained
in
VarArg
. 0to32
argumentscanbe
passed.
Return Value. . None.
Remarks. Thisfunctioncanprocessa
Variant
arrayinasinglecallor
throughmultiplecallsusingthe
nStartAt
parameter.
Example. Thisexampleuses
MWUnpack
toprocessa
varargout
cellinto
severalExcelranges,whileauto-resizingeachrange. The
varargout
parameterissuppliedfromamethodthathasbeencompiledfromthe
MATLABfunction.
function varargout = randvectors
for i=1:nargout
varargout{i} = = rand(i,1);
end
C-7
C
Utility Library
Thisfunctionproducesasequenceof
nargout
randomcolumnvectors,with
thelengthofthe
i
thvectorequaltoi.Assumethatthisfunctionisincludedin
aclassnamed
myclass
thatisincludedinacomponentnamed
mycomponent
withaversionof1.0. TheVisualBasicsubroutinetakesnoargumentsand
placestheresultsintoExcelcolumnsstartingatA1,B1,C1,andD1. Ifan
erroroccurs,amessageboxdisplaystheerrortext.Thisfunctionassumes
that
MWInitApplication
hasbeenpreviouslycalled.
Sub GenVectors()
Dim aClass s As Object
Dim aUtil As Object
Dim v v As s Variant
Dim R1 As Range
Dim R2 As Range
Dim R3 As Range
Dim R4 As Range
.
.
.
On Error GoTo o Handle_Error
Set aClass s = = CreateObject("mycomponent.myclass.1_0")
Set aUtil = CreateObject("MWComUtil.MWUtil")
Set R1 = Range("A1")
Set R2 = Range("B1")
Set R3 = Range("C1")
Set R4 = Range("D1")
Call aClass.randvectors(4, , v)
Call aUtil.MWUnpack(v,0,True,R1,R2,R3,R4)
Exit Sub
Handle_Error:
MsgBox (Err.Description)
End Sub
SubMWDate2VariantDate(pVar)
ConvertsoutputdatesfromMATLABto
Variant
dates.
C-8
UtilityLibraryClasses
Parameters.
Argument
Type
Description
pVar
Variant
Variant
tobeconverted
Return Value. . None.
Remarks. MATLABhandlesdatesasdouble-precisionfloating-point
numberswith0.0representing0/0/0000:00:00(see“DataConversionRules”
onpageB-2formoreinformationonconversionbetweenMATLABand
COMdatevalues).Bydefault,numericdatesthatareoutputparameters
fromcompiledMATLABfunctionsarepassedas
Double
sthatneedtobe
decrementedbytheCOMdatebiasaswellascoercedtoCOMdates. The
MWDate2VariantDate
methodperformsthistransformationandadditionally
convertsdatesinstringformtoCOMdatetypes.
Example. Thisexampleuses
MWDate2VariantDate
toprocessnumericdates
returnedfromamethodcompiledfromthefollowingMATLABfunction:
function x = getdates(n, inc)
y = now;
for i=1:n
x(i,1) = = y + (i-1)*inc;
end
Thisfunctionproducesan
n
-lengthcolumnvectorofnumericvalues
representingdatesstartingfromthecurrentdateandtimewitheachelement
incrementedby
inc
days. Assumethatthisfunctionisincludedinaclass
named
myclass
thatisincludedinacomponentnamed
mycomponent
with
aversionof1.0. ThesubroutinetakesanExcelrangeanda
Double
as
inputsandplacesthegenerateddatesintothesuppliedrange. Ifanerror
occurs,amessageboxdisplaystheerrortext. Thisfunctionassumesthat
MWInitApplication
hasbeenpreviouslycalled.
Sub GenDates(R R As Range, , inc As Double)
Dim aClass s As Object
Dim aUtil As Object
On Error GoTo o Handle_Error
Set aClass s = = CreateObject("mycomponent.myclass.1_0")
C-9
C
Utility Library
Set aUtil = CreateObject("MWComUtil.MWUtil")
Call aClass.getdates(1, , R, R.Rows.Count, , inc)
Call aUtil.MWDate2VariantDate(R)
Exit Sub
Handle_Error:
MsgBox (Err.Description)
End Sub
ClassMWFlags
The
MWFlags
classcontainsasetofarrayformattinganddataconversion
flags(see“DataConversionRules”onpageB-2formoreinformationon
conversionbetweenMATLABandCOMAutomationtypes).AllExcelBuilder
componentscontainareferencetoan
MWFlags
objectthatcanmodifydata
conversionrulesattheobjectlevel.Thisclasscontainstheseproperties:
• “PropertyArrayFormatFlagsAsMWArrayFormatFlags”onpageC-10
• “PropertyDataConversionFlagsAsMWDataConversionFlags”onpage
C-13
• “SubClone(ppFlagsAsMWFlags)”onpageC-15
PropertyArrayFormatFlagsAsMWArrayFormatFlags
The
ArrayFormatFlags
propertycontrolsarrayformatting(asamatrix
oracellarray)andtheapplicationoftheserulestonestedarrays. The
MWArrayFormatFlags
classisanoncreatableclassaccessedthroughan
MWFlags
classinstance.Thisclasscontainstheseproperties:
• “PropertyInputArrayFormatAsmwArrayFormat”onpageC-11
• “PropertyInputArrayIndFlagAsLong”onpageC-11
• “PropertyOutputArrayFormatAsmwArrayFormat”onpageC-12
• “PropertyOutputArrayIndFlagAsLong”onpageC-12
• “PropertyAutoResizeOutputAsBoolean”onpageC-13
• “PropertyTransposeOutputAsBoolean”onpageC-13
C-10
Documents you may be interested
Documents you may be interested