Inventor iLogic 工程图模板

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

doc = ThisDoc.Document
If doc.ActiveSheet.DrawingViews.Count >0 Then
nMass = CDblAny(doc.ActiveSheet.DrawingViews(1).ReferencedDocumentDescriptor.ReferencedDocument.PropertySets(3).item(39).Expression)/1000
If nMass<100 Then
iProperties.Value("Custom", "质量")=CStr(Round(nMass, 1))
Else
iProperties.Value("Custom", "质量")=CStr(Round(nMass, 0))
End If

iProperties.Value("Custom", "比例")=Replace(doc.ActiveSheet.DrawingViews(1).ScaleString," ","")
Else
iProperties.Value("Custom", "质量")=""
iProperties.Value("Custom", "比例")=""
End If
------------------------------------------------------------------分割线----------------------------------------------------------------------------

On Error Goto Handler
doc = ThisDrawing.ModelDocument

If doc.DocumentType = kAssemblyDocumentObject Then
If ActiveSheet.Size="A3" Or ActiveSheet.Size="A4" Then
ActiveSheet.Border = "GB(A3-A4)"
ActiveSheet.TitleBlock = "GZ_IAM(A3-A4)"
ElseIf ActiveSheet.Size="A0" Or ActiveSheet.Size="A1" Or ActiveSheet.Size="A2" Then
ActiveSheet.Border = "GB(A0-A2)"
ActiveSheet.TitleBlock = "GZ_IAM(A0-A2)"
End If
ElseIf doc.DocumentType = kPartDocumentObject Then
If ActiveSheet.Size="A3" Or ActiveSheet.Size="A4" Then
ActiveSheet.Border = "GB(A3-A4)"
ActiveSheet.TitleBlock = "GZ_IPT(A3-A4)"
ElseIf ActiveSheet.Size="A0" Or ActiveSheet.Size="A1" Or ActiveSheet.Size="A2" Then
ActiveSheet.Border = "GB(A0-A2)"
ActiveSheet.TitleBlock = "GZ_IPT(A0-A2)"
End If
End If

Handler:
Return



If ThisDrawing.Document.ActiveSheet.DrawingViews.Count>0 Then
View1=ThisDrawing.Document.ActiveSheet.DrawingViews(1)
ModelName=IO.Path.GetFileName(ActiveSheet.View().ModelDocument.FullFileName)
iProperties.Value(ModelName,"Custom", "图纸比例")=View1.ScaleString
=Mid(ModelName,1,9)
If pare(Right(ModelName,3),"ipt")<>0 Then
iProperties.Value(ModelName,"Custom", "质量")=CStr(Round(iProperties.Mass(ModelName),1))
Else
iProperties.Value(ModelName,"Custom", "质量")=CStr(Round(iProperties.Mass(ModelName),2))
End If
Else
="BOM"
End If


相关文档
最新文档