乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 53|回复: 3

[求助]插入dxf文件的问题,急!急!急!

[复制链接]

2

主题

5

帖子

1

银币

初来乍到

Rank: 1

铜币
13
发表于 2008-7-8 21:21:00 | 显示全部楼层 |阅读模式
请教各位一个问题,我用到语句ThisDrawing.Import PathName, pt() ,1插入一个dxf文件,为什么插入后不显示图元呢,但是能选中,就是看不见,请高手指点,非常感谢!
回复

使用道具 举报

2

主题

5

帖子

1

银币

初来乍到

Rank: 1

铜币
13
发表于 2008-7-9 08:35:00 | 显示全部楼层
怎么没人回复啊,自己顶一下吧,请高手指点啊~
回复

使用道具 举报

25

主题

219

帖子

6

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
319
发表于 2008-7-9 10:34:00 | 显示全部楼层
Sub Example_Import()
    ' This example will create a new drawing. Be sure to save
    ' your work and start a new drawing before running this example.
    ' This example creates a circle. It then exports the drawing
    ' to a file called DXFExprt.DXF. It then opens a new drawing
    ' and imports the file.
   
    ' Create the circle for visual representation
    Dim circleObj As AcadCircle
    Dim centerPt(0 To 2) As Double
    Dim radius As Double
    centerPt(0) = 2: centerPt(1) = 2: centerPt(2) = 0
    radius = 1
    Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPt, radius)
    ZoomAll
   
    ' Create an empty selection set
    Dim sset As AcadSelectionSet
    Set sset = ThisDrawing.SelectionSets.Add("TEST")
   
    ' Export the current drawing to the file specified above.
    Dim exportFile As String
    exportFile = "C:\my documents\DXFExprt"    ' Adjust path for your system
    ThisDrawing.Export exportFile, "DXF", sset
   
    ' Open a new drawing
    Dim Acad As AcadApplication
    Dim newdoc As AcadDocument
    Set Acad = ThisDrawing.Application
    Set newdoc = Acad.Documents.Add("acad.dwt")
   
    ' Define the import
    Dim importFile As String
    Dim InsertPoint(0 To 2) As Double
    Dim scalefactor As Double
    importFile = "C:\my documents\DXFExprt.dxf"  ' Adjust path for your system
    InsertPoint(0) = 0#: InsertPoint(1) = 0#: InsertPoint(2) = 0#
    scalefactor = 2#
   
    ' Import the file
    ThisDrawing.Import importFile, InsertPoint, scalefactor
    ZoomAll
   
End Sub你的用法和他的例子不同。没事多看看帮助。
回复

使用道具 举报

2

主题

5

帖子

1

银币

初来乍到

Rank: 1

铜币
13
发表于 2008-7-9 16:56:00 | 显示全部楼层
我的程序和例子相同啊,还是不显示!请教各位了?
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-7-4 09:47 , Processed in 0.513285 second(s), 60 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表