Hello,
I would like to generate a point and an "etiquette" (I don't know the english word for that) in VBA and adding it to my block
I attached a picture showing what I want this is easier 😉
Regards,
Nicolas
Maybe 'notes'... I don't use english ACE too.
But it's in 'Home' ribbon, Annotations... circle with an arrow under 'Size'.
Is this you looking for?
Can you be more specific?
To draw some lines, and add a text to it... that I can help you with in VBA. But.. adding it to the block?
What block? Shold the lines/text be added to the block? Might make some trouble for you....
Morning,
Thanks for your answer so, I will try to explain my problem:
I would like to have something like a connection point and a annotation referring to this point in VBA in order to be abler to generate automatically wire between this two points in VBA. If some one have example of kind of project similar I will be grateful.
Sub Design_1()
'Define the block
Dim blockObj As AcadBlock
Dim insertionPnt(0 To 2) As Double
insertionPnt(0) = 0
insertionPnt(1) = 0
insertionPnt(2) = 0
Set blockObj = ThisDrawing.Blocks.Add(insertionPnt, "CircleBlock")
' Add a circle to the block
Dim circleObj As AcadCircle
Dim center(0 To 2) As Double
Dim radius As Double
center(0) = 0
center(1) = 0
center(2) = 0
radius = 1
Set circleObj = blockObj.AddCircle(center, radius)
Set blockObj = ThisDrawing.Blocks.Add(insertionPnt, "Polyline")
' Define the outside of the dessin_1
Dim Point(14) As Double
Dim poly As AcadPolyline
Point(0) = 0: Point(1) = 0: Point(2) = 0
Point(3) = 80: Point(4) = 0: Point(5) = 0
Point(6) = 80: Point(7) = 60: Point(8) = 0
Point(9) = 0: Point(10) = 60: Point(11) = 0
Point(12) = 0: Point(13) = 0: Point(14) = 0
Set poly = blockObj.AddPolyline(Point)
' Define the attribute definition, Cette partie permet d'ajouter un attribut au bloque
Dim attributeObj As AcadAttribute
Dim insertionPnt1(0 To 2) As Double
Dim height As Double
Dim mode As Integer
Dim prompt As String
Dim tag As String
Dim value As String
height = 5
mode = acAttributeModeNormal
tag1 = "Part_No"
prompt1 = "What is the Part No?"
value1 = "172.168.0.1"
insertionPnt1(0) = 5#: insertionPnt1(1) = 5: insertionPnt1(2) = 0
' Define the attribute definition, Cette partie permet d'ajouter un attribut au block
'Dim acadPT As AcadPoint
'Dim NewPoint(2) As Double
'NewPoint(0) = 40: NewPoint(1) = 0: NewPoint(2) = 0
' Insert the block MOP
Dim blockRefObj As AcadBlockReference
insertionPnt(0) = 150
insertionPnt(1) = 150
insertionPnt(2) = 0
' Add The Attribut IP¨to the Block
Set attributeObj = blockObj.AddAttribute(height, mode, prompt1, insertionPnt1, tag1, value1)
'Ajoute le cercle au block
Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock _
(insertionPnt, "CircleBlock", 1#, 1#, 1#, 0)
'Ajoute le rectangle au block
Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock _
(insertionPnt, "Polyline", 1#, 1#, 1#, 0)
ZoomAll
MsgBox "Le bloque se trouve " & blockRefObj.ObjectName
End Sub
So... In your drawing, you want to find all blocks named "CircleBlock", and connect these somehow, with an AEWIRE ?
Morning rhesusminus,
Sorry for my late answer but yes, I think i would like to to find two circle named something like "circle_128" and "circle_3" and connect these .
Maybe with an AEWIRE, i don't realy know the different wires, I am new on AutocadElectrical.
Regards
Nicolas