Macro in Drawing, Offset Coordinates

Hello

I create a marco that can be used for a drawing that creates, to begin with, lines in relation to a curve that is part of the bort of a flat surface.

I retrieve the start and end points of the said curve and create a line between these 2 points. The values found for these points correspond to the values of the part but not in the drawing. If I create a point on one end of my curve I have an offset, if I don't create a point and I click on the end of my curve, the information banner gives the correct coordinates. The line is created in the selected drawing. 

I've searched everywhere but now I'm drying. Anyone have an explanation/solution?

Thank you

Oops sorry for the mistakes

A screenshot would be desirable for good understanding

your curve has an X-ray

why not make this said curves on your part and not on your drawing

the drawings are only the reflection of your part in 3D

@+ ;-))

1 Like

Hello

Post your code with some explanations about the expected result.

See you

Couldn't it come from a matter of scale?

If you scale your plan 1:1 do you have the same problem?

I also think that some screen prints could help with understanding.

In fact it is a question of providing a canvas cutting plan, some of our customers are equipped with digital cutting but the majority of them cut by hand. So to allow the cutting at the min, we provide a plan where we give the "clamp" of the curve every x mm following the chord 


but.jpg

I haven't finished my answer but I have a lot of trouble with the interface of this forum ....

So the but.jpg file shows the principle of the goal to be achieved.  There are few values but when there are 40 panels of aevc fabric between 4 and 6 edge curves and 20 or 30 values of clamps per edge it becomes very annoying next to it whereas with our old software I had made a macro and in 1s per curve the trick was done so I want to get to the same level or almost.

So I attacked my macro  which gives me the result étape1.jpg, result that varies, sometimes it's good and other times it's not. I did a quick clean up of the attached macro by stopping it at this problem. For use, you have to choose the default pitch and then select an edge.

Thank you 


macrossw.zip

Well, I put aside my mullet tendency and modified my macro for use in a part file. It lacks safety tests, a little cosmetic, a clean output..  but the bottom is there... But I still don't see why there is a problem in a drawing.

So I have 2 "problems" that I don't know how to solve:

- Test that a sketch is active

- put the cursor in my "not default" cell by default

To use it, you have to open a sketch in the face plane of the attached file, run the marco, you can change the default pitch then you select an edge and miracle, normally it works.


partmacrossw.zip

Good evening

I advanced in the solution directly in the room, my last 2 questions ... I' ve solved them but I have another one where I don't see the solution: the clean output of the macro when you press Exit. I'm attaching the macro up to date.

Thank you


quotationborddelepart.swp

I'm trying to watch tonight.

Well, since no one likes me, I managed on my own like the grown-up I am;)

When you retrieve object information from the model in a drawing view, the information is given in the coordinate system of the model, when you create a sketch in the active view it is in the coordinate system of the view and when you create a dimension the positioning points are in the coordinate system of the sheet.

The system of the model and the view are identical to the origin, this origin varies according to the orientation and scale of the view. 

So I finalized my Macro with a drawing because it was much faster and simpler in the context of my use.

 

1 Like