.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to use dxfcode.textfontfile , dxfcode.lineweight

2 REPLIES 2
Reply
Message 1 of 3
hoyin0820
438 Views, 2 Replies

how to use dxfcode.textfontfile , dxfcode.lineweight

Public Class Zoom
<CommandMethod("ZO")> _
Public Sub ZO()

 

Dim acDoc As Document = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument
Dim acDocEd As Editor = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument.Editor
Dim acCurDb As Database = acDoc.Database

 


Dim acTypValAr(4) As TypedValue
acTypValAr.SetValue(New TypedValue(DxfCode.Operator, "<AND"), 0)
acTypValAr.SetValue(New TypedValue(DxfCode.Start, "TEXT,MTEXT"), 1)
acTypValAr.SetValue(New TypedValue(DxfCode.TextFontFile, "txt"), 2)

acTypValAr.SetValue(New TypedValue(DxfCode.lineweight, lineweight.lineweight030),3)
acTypValAr.SetValue(New TypedValue(DxfCode.Operator, "AND>"), 4)

 

Dim acSelFtr As SelectionFilter = New SelectionFilter(acTypValAr)

Dim acSSPrompt As PromptSelectionResult
acSSPrompt = acDocEd.SelectAll(acSelFtr)

 

If acSSPrompt.Status <> PromptStatus.OK Then
Return
End If
Dim idCol As New ObjectIdCollection(acSSPrompt.Value.GetObjectIds())
ZoomObjects(idCol)

End Sub

 

 

acTypValAr.SetValue(New TypedValue(DxfCode.TextFontFile, "txt"), 2)

acTypValAr.SetValue(New TypedValue(DxfCode.lineweight, lineweight.lineweight030),3)

this two lines do not work.

what problem is it ???

 

and does it exist text hiegh and text width on dxfcode???

2 REPLIES 2
Message 2 of 3
hoyin0820
in reply to: hoyin0820

and i also have some question .

 

how can i get text and mtext properties on the drawing, such as text font, text height, text width

 

 

Dim acTypValAr(2) As TypedValue
acTypValAr.SetValue(New TypedValue(DxfCode.Operator, "<AND"), 0)
acTypValAr.SetValue(New TypedValue(DxfCode.Start, "TEXT,MTEXT"), 1)
acTypValAr.SetValue(New TypedValue(DxfCode.Operator, "AND>"), 2)

Dim acSelFtr As SelectionFilter = New SelectionFilter(acTypValAr)

Dim acSSPrompt As PromptSelectionResult
acSSPrompt = acDocEd.SelectAll(acSelFtr)

If acSSPrompt.Status = PromptStatus.OK Then

 

' get text font, text hieght, text wdth


End If

Message 3 of 3
mzakiralam
in reply to: hoyin0820

did you check the below link:

http://exchange.autodesk.com/autocad/enu/online-help/search#WS1a9193826455f5ff18cb41610ec0a2e719-7a6...

 

You can also check below links for MTEXT and TEXT group code:

 

http://exchange.autodesk.com/autocad/enu/online-help/browse#WS1a9193826455f5ff18cb41610ec0a2e719-79d...

 

http://exchange.autodesk.com/autocad/enu/online-help/browse#WS1a9193826455f5ff18cb41610ec0a2e719-79f...



You can also use system variable. if you want to use selection filter, I will recommend you to use different color for different object. Filter with color is also available

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost