Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to move a line in a drawing?

Status
Not open for further replies.

fuzhonghua

Mechanical
Feb 27, 2020
4
CN
Hi,
This way of moving is not good:
In the case of unknown coordinate values, you cannot delete a line and then create a new line, especially when there are multiple lines.
So, how to easily move a line(Line2D)?
Thanks!
 
Replies continue below

Recommended for you

Achieved in this way

Dim Direction(), Origin()
SelectAll "CATDrwSearch.2DGeometry.Name=BomHead_Line*"
count = Selection.Count2
For i = 1 To count
ReDim Direction(2), Origin(2)
Set Line=Selection.Item2(i).Value
Line.GetDirection(Direction)
Line.GetOrigin(Origin)
Line.SetData Origin(0) + Translation(0), Origin(1) + Translation(1), Direction(0), Direction(1)
Next
Selection.Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top