vb點(diǎn)虐 打印cad vb打印對(duì)話框

如何使用vb點(diǎn)虐 調(diào)用cad進(jìn)行繪圖

你去查查書(shū)吧,書(shū)上挺詳細(xì)的,在這說(shuō)不好說(shuō),你先在項(xiàng)目里引用。然后 Dim acadapp As AcadApplication Dim acaddoc As AcadDocument On Error Resume Next AcadApp = GetObject(, "AutoCAD.Application") If Err.Number Then Err.Clear() AcadApp = CreateObject("AutoCAD.Application") If Err.Number Then MsgBox("不能運(yùn)行AutoCAD,請(qǐng)檢查是否安裝了AutoCAD") Exit Sub End If End If AcadApp.Visible = True '界面可視

成都創(chuàng)新互聯(lián)堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:成都網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶(hù)于互聯(lián)網(wǎng)時(shí)代的滎陽(yáng)網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!

vb點(diǎn)虐 打印功能

可以把數(shù)據(jù)導(dǎo)出到EXCEL,然后使用EXCEL進(jìn)一步處理后使用。

也可以做成vb報(bào)表(VB自帶有)。

先設(shè)置報(bào)表格式,打印時(shí)向報(bào)表傳遞數(shù)據(jù)就可以了。

在vb中如何調(diào)用autocad進(jìn)行打印

''''取得當(dāng)前文檔對(duì)象 VB a中的方法,如果是在VB中時(shí)需要從頂層對(duì)象開(kāi)始引用取得)

Dim currentDoc As AcadDocument

Set currentDoc = ThisDrawing

''''文檔的模型空間

Dim sp As AcadModelSpace

Set sp = currentDoc.modelspace

''''取得模型空間中的塊屬性

Dim index As Integer

For index = 0 To sp.Count - 1

Dim name As String

name = sp.Item(index).ObjectName

''''判斷模型空間中的項(xiàng)目是否是一個(gè)塊引用

If name Like "*Ac*" Then

Dim blockRef As AcadBlockReference

Set blockRef = sp.Item(index)

''''塊引用的插入點(diǎn)

Dim insertPoint As Variant

insertPoint = blockRef.InsertionPoint

''''放大比例

Dim xScale, yScale As Integer

xScale = blockRef.XScaleFactor

yScale = blockRef.YScaleFactor

''''寬高基數(shù)

Dim width, height As Double

width = 297

height = 210

''''打印區(qū)域

Dim UpperRight(0 To 1) As Double, LowerLeft(0 To 1) As Double

UpperRight(0) = insertPoint(0)

UpperRight(1) = insertPoint(1)

LowerLeft(0) = insertPoint(0) + width * xScale

LowerLeft(1) = insertPoint(1) - height * yScale

list.AddItem "inserPoint:X=" UpperRight(0) " Y:" UpperRight(1)

list.AddItem "lowerLeft :X=" LowerLeft(0) " Y:" LowerLeft(1)

Dim plotConfs As AcadPlotConfigurations

Set plotConfs = ThisDrawing.PlotConfigurations

list.AddItem plotConfs.Count

Dim plotconf As AcadPlotConfiguration

Set plotconf = plotConfs.Add("plot")

''''list.AddItem plotconf.GetPlotDeviceNames(5)

''''Set plotConf = ThisDrawing.PlotConfigurations.Add

''''設(shè)置定義要打印的布局范圍的坐標(biāo)

ThisDrawing.ActiveLayout.SetWindowToPlot LowerLeft, UpperRight

''''指定布局或打印配置的類(lèi)型

ThisDrawing.ActiveLayout.PlotType = acWindow

''''按局部或完整視圖預(yù)覽方式顯示打印預(yù)覽對(duì)話框

ThisDrawing.Plot.DisplayPlotPreview acFullPreview

''''打印布局到設(shè)備

ThisDrawing.Plot.PlotToDevice

End If

Next index

當(dāng)前題目:vb點(diǎn)虐 打印cad vb打印對(duì)話框
分享網(wǎng)址:http://muchs.cn/article8/ddcjoop.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計(jì)電子商務(wù)、ChatGPT、網(wǎng)站收錄、云服務(wù)器、網(wǎng)站導(dǎo)航

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都網(wǎng)頁(yè)設(shè)計(jì)公司