ScaleFactor Example |
Using Programming Languages other than VBA
Sub Example_ScaleFactor() ' This example creates a text object in model space. ' It then finds the current scale factor and changes it. Dim textObj As AcadText Dim textString As String Dim insertionPoint(0 To 2) As Double Dim height As Double ' Define the text object textString = "Hello, World." insertionPoint(0) = 2: insertionPoint(1) = 2: insertionPoint(2) = 0 height = 0.5 ' Create the text object in model space Set textObj = ThisDrawing.ModelSpace.AddText(textString, insertionPoint, height) ZoomAll ' Find the current scale factor for the text object Dim currScaleFactor As Double currScaleFactor = textObj.scalefactor MsgBox "The scale factor of the text is " & textObj.scalefactor, , "ScaleFactor Example" ' Change the scale factor for the text object textObj.scalefactor = currScaleFactor + 1 ThisDrawing.Regen True MsgBox "The scale factor of the text is now " & textObj.scalefactor, , "ScaleFactor Example" End Sub
Comments? |
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@entercad.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.