VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

change Polyline.width in VBA

3 REPLIES 3
Reply
Message 1 of 4
Syrus1356
2768 Views, 3 Replies

change Polyline.width in VBA

Hi

I want Change 2000 PolyLine width Like this :

PolyLine.Width = PolyLine.Width + 1

PLEASE write me a VBA code to do that
3 REPLIES 3
Message 2 of 4
arcticad
in reply to: Syrus1356

{code}
Sub plineWidth()
For Each item In ThisDrawing.ModelSpace
If TypeOf item Is AcadLWPolyline Then
item.ConstantWidth = item.ConstantWidth + 1
End If
Next
End Sub
{code}
---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 3 of 4
Syrus1356
in reply to: Syrus1356

Hi
Thanks very much for ur Response
But My exact Problem is this:

Status is :
1- there are several thousand polyline in my drawing
2- and i defined an object data named "CODENOS" and obgect data field named "ADDRESS" (type is character) and attached to that
polylines

What i want to Do is like This:
1- User select several polylines
2- And by running a VBA macro I want take place under below event :


Dim Pline as ACADLWpolyline

For each object in selected Area
If Type of Object is ACADLWpolyline
Object.Hyperlink. = Object.ObjectData(CODENOS).Field(ADDRESS).value
End if
Next

----------------
WHAT IS EXACT VBA Code For up mentioned pesudo code ?
----------------


Sincerely
Message 4 of 4
Anonymous
in reply to: Syrus1356

{quote}
PLEASE write me a VBA code to do that
{quote}

Search the group for 'filtered selection set' - many examples of creating
one and
iterating through it. There are also samples right in the help menu. If you
have a problem with the code post it back and someone will gladly help you.

Also search on 'SelectOnScreen' which should get you close to the proper
selection set type.


wrote in message news:6241992@discussion.autodesk.com...
Hi

I want Change 2000 PolyLine width Like this :

PolyLine.Width = PolyLine.Width + 1

PLEASE write me a VBA code to do that

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost