27 | 06 | 2017

(Dim) Scalefactor

Below a function is show that sets the scalefactor of Acadobjects. The samples shows how to set the Dim Scale. All dimension objects are filtered out and a scalefactor is applied.

Function ScaleDim(ByVal scalefactor As Double)
 
'***********************************
'**DownloadedfromVisibleVisual.com**
'***********************************
 
    Dim iType(0) As Integer
    Dim vValue(0) As Variant
    Dim sSet As AcadSelectionSet
    Dim aEntity As AcadEntity
    Dim iCount As Integer
 
    On Error Resume Next
    'Filter all dimension objects and add them to a selection set
    iType(0) = 0
    vValue(0) = "DIMENSION"
 
    Set sSet = ThisDrawing.SelectionSets.Add("DIMENSIONS")
    sSet.Select acSelectionSetAll, , , iType, vValue
    For Each aEntity In sSet
 
    'Set the scale factor
    aEntity.scalefactor = scalefactor '''overall scale
    Next
    iCount = sSet.Count
    sSet.Delete
    Update
 
End Function
Login

Sign up now and upload your code to the website.

Help us to continue.....
Statistics
Articles View Hits
2288493
Latest Articles