Hellow Everyone,
Can somebody help me with geting polyline height in autocad 2008 vba macro
Please help.
the picture below show what i want
Thankyou for your help.
Aprecciated
Hi,
The polyline height will be := |Max(Ycoordinates) - Min(Ycoordinates)|, do you have some trouble obtaining the coordinates of the polyline?
Gaston Nunez
You should post this in the Visual Basic Customization Forum:
http://forums.autodesk.com/t5/visual-basic-customization/bd-p/33
Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator | Layer Apps | List on Steroids | VP Zoom Scales
Exchange App Store
Can you pleasse show me an example of how to use your code for MaxY and Min Y?
Thankyou .Aprecciated your help
Hi,
Do you know how to program? find the max or min of an array it's a very, very basic algorithm:
1.-Take the first value of the array, asign a variable max to this value
2.-Iterate the array, and compare max against each antry
3.- If that entry it's greater than max, update max to this value
4.-At the end max has the max value of the array
For min, change "grater than" for "less than"
An alternative it's to program a sort over the array, so at the end of the sorting process you will have the max and the min of the array.
Gaston Nunez
Thenkyou for your help.
I will try to make a function from your suggestions
Best Regards
This is a code fragment (untested) that might point to an alternative solution.
Dim obj As AcadObject 'any object Dim llc As AcadPoint 'lower left corner Dim urc As AcadPoint 'upper right corner Dim h As Double 'height '...code to select an object including polylines..not shown obj.GetBoundingBox llc, urc h = urc(0, 1) - llc(0, 1)
Hellow Dbroad,
Is there a way to select only a polyline and get boundary of it ,without select the points
Thankyou so much
What do you mean by "get a boundary of it"?
If you do not know how to select objects using vba, then you should post this question on the vba newsgroup where you can get more assistance. If you are willing to accept LISP solutions, then let us know.
I reffer to autocad vba so YEs a need to ask the question to vba customization
Thankyou for your help