• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Visual Basic Customization

    Reply
    *Sukru Baykan

    Measure or divide command in vba

    344 Views, 3 Replies
    04-06-2005 11:53 PM
    I want to insert a block along a polyline like measure or divide command. Is there a way to use these commands in vba ? Sukru Baykan
    Please use plain text.
    Active Member
    tproby
    Posts: 7
    Registered: ‎02-22-2011

    Re: Measure or divide command in vba

    02-24-2011 10:23 AM in reply to: *Sukru Baykan

    Also need this functionality but looking at other posts, it seems you have to use LISP.

    Please use plain text.
    New Member
    truss85
    Posts: 2
    Registered: ‎02-23-2011

    Re: Measure or divide command in vba

    02-24-2011 11:19 PM in reply to: *Sukru Baykan

    first of all

    you need to insert block command I send an example...

    then you specified the coords. of the where the block inserted.

    along a polyline I suggest get coordinate method.

    if you describe your problem with details, I can help with further imformation.

    here is insert block example which already existed in acad

    sub is add block to (0,0,0) coordinate, you can modfiy to polyline coordinates..

     

    Sub block_ekleme()
        Dim blocknesnesi As AcadBlockReference
        Dim kesisim(0 To 2) As Double
        kesisim(0) = 0: kesisim(1) = 0: kesisim(2) = 0
        Set blocknesnesi = ThisDrawing.ModelSpace.InsertBlock(kesisim, "blo", 1#, 1#, 1#, 0)
        ZoomAll
    End Sub

     

    Please use plain text.
    Valued Contributor
    bojko108
    Posts: 61
    Registered: ‎01-23-2011

    Re: Measure or divide command in vba

    02-25-2011 03:30 AM in reply to: *Sukru Baykan

    it is fairly easy to do mathematically. Here is one example. It is maybe little complex :smileyhappy: but will give you directions how to do it. There is a way with SendCommand() method but I don't know how it works. Look in Help Menu there is plenty of examples

    Please use plain text.