乐筑天下

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

VBA图像控制

[复制链接]

0

主题

7

帖子

5

银币

初来乍到

Rank: 1

铜币
9
发表于 2006-3-15 14:57:09 | 显示全部楼层
我做过一些测试,其中插入单元和接收单元以及所有单元都以英寸为单位,仍然如此。哦,这很容易解决
回复

使用道具 举报

0

主题

11

帖子

5

银币

初来乍到

Rank: 1

铜币
12
发表于 2006-3-15 14:58:46 | 显示全部楼层
奇怪,我的SF of one正在更改为.1328
的SF,如果您稍后重置它,则可以工作,尽管
  1. Sub RastaRenameMon()
  2.   Dim objSelSets As AcadSelectionSets
  3.   Dim objSelSet As AcadSelectionSet
  4.   Dim intType(0) As Integer
  5.   Dim varData(0) As Variant
  6.   Dim objImg As AcadRasterImage
  7.   Dim objNewImg As AcadRasterImage
  8.   Dim strImgName As String
  9.   Dim strDwgName As String
  10.   Dim strImgExt As String
  11.   Dim strImgPath As String
  12.   Dim strNewName As String
  13.   Dim dblScale As Double
  14.   
  15.   strDwgName = Left(ThisDrawing.Name, Len(ThisDrawing.Name) - 4)
  16.   Set objSelSets = ThisDrawing.SelectionSets
  17.   For Each objSelSet In objSelSets
  18.     If objSelSet.Name = "Imagen" Then
  19.       objSelSets.Item("Imagen").Delete
  20.       Exit For
  21.     End If
  22.   Next
  23.   Set objSelSet = objSelSets.Add("Imagen")
  24.   intType(0) = 0
  25.   varData(0) = "IMAGE"
  26.   objSelSet.Select acSelectionSetAll, _
  27.   filtertype:=intType, filterdata:=varData
  28.   If objSelSet.Count > 0 Then
  29.   For Each objImg In objSelSet
  30.     strImgExt = Right(objImg.ImageFile, 4)
  31.     strImgName = objImg.Name
  32.     strImgPath = Left(objImg.ImageFile, Len(objImg.ImageFile) - Len(strImgName) - 4)
  33.     strNewName = strImgPath & strDwgName & strImgExt
  34.     FileCopy objImg.ImageFile, strNewName
  35.     dblScale = objImg.ScaleFactor
  36.     Set objNewImg = PaperSpace.AddRaster(strNewName, objImg.Origin, dblScale, objImg.Rotation)
  37.     objNewImg.ScaleFactor = dblScale
  38.     DetachImage (strImgName)
  39.     Kill strImgPath & strImgName & strImgExt
  40.   Next objImg
  41.   End If
  42. End Sub
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-7-6 06:04 , Processed in 0.781849 second(s), 54 queries .

© 2020-2025 乐筑天下

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