cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Report Dimension Artwork to move object in Macro

FrancisPaille
7-Bedrock

Report Dimension Artwork to move object in Macro

Is there a way to incorporate dimension reportated from artwork in macro? I explain... I have many custom frame inside STD Isodraw frame with text inside in middle of the lowest line frame. I would like to take this text and move to the top line frame. The probleme i have, is all my custom frame have different size,

the only thing who does not change is the lowest line frame and text. So i try do create a macro to select line of side frame just by selecting rectangle selection, and report dimension of this line to move text (title) under lower top frame line, by removing 0.25in from this reported dimension (text dimension 2X).

Thanks!

1 REPLY 1

If you have only one custom frame per illustration and this frame is drawn with a special pen,

like in the examples attached, you should consider to select the lines of the frame by pen. E.g.:

SELECT IF pen is equal to "frames"

Next step would be to loop thru the selected elements with firstSelectedElement and nextSelectedElement,

and tell from the startPoints and endPoints which of line of the frame you got. E.g.

el = activeDoc.firstSelectedElement

el3 = el.nextSelectedElement.nextSelectedElement

y = el.line.startPoint.y

IF ( y=el.line.segment[1].endPoint.y )

# First line is vertical

y3= el3.line.startPoint.y

IF ( y3=el3.line.segment[1].endPoint.y )

# Third line is also vertical

IF ( y>y3 )

# First line is right to third line ...

END IF

END IF

END IF

Top Tags