2008-05-13

reOrdination

What I meant to say was changing your ordinates (dimension that is). I was looking how to change an ordinate dimension's origin in VB but I found that there is no property for that. Rats. I came up with a side track to do it and I figured I would post it if you needed to reordinate also.

Private Sub SetOrdinateZeroPoint(ByVal sHandle As String, ByVal vPt As Variant)
'------------------------------------------------------------------------------
'Changes an ordinate dims origin
'Arguments: sHandle - handle of dim entity
' vPt - variant point of new origin
'Example: Call SetOrdinateZeroPoint(acEnt.Handle, vPt1)
'------------------------------------------------------------------------------
ThisDrawing.SendCommand "(setq dimEnt (entget (handent """ & sHandle & """)))" & vbCr
ThisDrawing.SendCommand "(entmod (subst '(10 " & vPt(0) & " " & vPt(1) & " 0.0) (assoc 10 dimEnt) dimEnt))" & vbCr
End Sub

2008-05-05

Exploding Mechanical Objects

I know that those who work with Mechanical can appreciate the Mechanical objects that it creates and how it makes life easier. But what if another client wants the drawings and does not want these proxy entities in the drawing. The method usually suggested is to tell them to get the object enabler or to manually explode those objects (which Mechanical does fairly well). I have created a macro to explode the Mechanical objects to their AutoCAD equivalents and I wanted to know if anyone had any interest on a posting of a compiled version. Let me know if there is any interest. Thanks.