Page 1 of 1

Scripts

Posted: Sun Jan 01, 2012 4:32 pm
by debenriver
Hi Eric

I've been trying without success to write a script to draw an autosize line to use for dimensioning. My RealBasic skills are pretty bad!

What I want to do is draw a line perpendicular to a first line across to a second line, have it put an arrow at each end, work out the line length and insert the line length in the centre of the drawn line like this:

Image

Any hints would be most welcome!

Re: Scripts

Posted: Mon Jan 02, 2012 9:42 am
by Eric Pousse
Bonjour George and Happy new year !

Why don't you use the dimension tool?
But you cannot have the text exactly as you want.

Re: Scripts

Posted: Mon Jan 02, 2012 1:03 pm
by debenriver
Happy New Year to you too Eric!

Some of my drawings are necessarily very detailed with lots of dimensions, often at odd angles, so I have to use both inside arrows and outside arrows. There is not usually space for the dimension to be above the dimension line. And I need diameters, radii etc - see extract below which is part of a bigger drawing of mast fittings for a small sailboat design – the drawing is at 1:2 scale which is the largest scale I can use for this drawing and still have the average user print it out. I deliver my drawings as online downloadable, so this drawing will eventually be a PDF. Others, for direct CNC manufacture, get delivered as DXF, and these don't have any dimensions etc.

So I've sort of developed a system over the years that works for me, based on the old clariscad autosize line with arrows both ends. I draw the dashed witness lines where I want them and then use the autosize line to provide the dimension.

I was interested to discover if I could write a script to do the same thing.But I'm not having a lot of success!

Image

If you tell me it is possible given the scripts tools available, I will persevere!

best regards - George

Re: Scripts

Posted: Tue Jan 03, 2012 11:20 am
by Eric Pousse
Possible yes
Easy probably not

Re: Scripts

Posted: Tue Jan 03, 2012 11:39 am
by debenriver
Eric Pousse wrote:Possible yes
Easy probably not
Hmmm ... possible is good!