How to convert a shape in to fence?

Anonymous
Anonymous

hi,

any methods for converting shape to fence e.g: if we draw an ellipse that ellipse shape i need to convert it into fence

can any one help me out

tanks

Praveen

Parents
  • Hi,

    In this sub you can to pass the ID of element. Yo can to use with the ID of several types of elements (e.g. ellipse)

    Public Sub FenceDraw(ByRef oElemID As DLong)Dim oElem As Element
    Dim myView As View
    Set oFence = ActiveDesignFile.Fence
    oFence.Undefine 'Quito Fence
    Set myView = CommandState.LastView
    Set oElem = ActiveDesignFile.GetElementByID(oElemID)
    oFence.DefineFromElement myView, oElem
    oFence.Draw

    End Sub

    But if you want delete your ellipse you can to add the line: application.activemodelreference.removelement eElem.

    Regards

Reply
  • Hi,

    In this sub you can to pass the ID of element. Yo can to use with the ID of several types of elements (e.g. ellipse)

    Public Sub FenceDraw(ByRef oElemID As DLong)Dim oElem As Element
    Dim myView As View
    Set oFence = ActiveDesignFile.Fence
    oFence.Undefine 'Quito Fence
    Set myView = CommandState.LastView
    Set oElem = ActiveDesignFile.GetElementByID(oElemID)
    oFence.DefineFromElement myView, oElem
    oFence.Draw

    End Sub

    But if you want delete your ellipse you can to add the line: application.activemodelreference.removelement eElem.

    Regards

Children
No Data