Author Topic: Linetype scale  (Read 7288 times)

0 Members and 1 Guest are viewing this topic.

2e4lite

  • Guest
Re: Linetype scale
« Reply #15 on: April 30, 2014, 01:16:05 AM »
   Thank you all very much for your attention and I apologize for my late reply.  irneb,The method of your code is nice . In fact , There is just a feeling about the scales to me, many changes and condition . Luckily, I had resolved it by myself in the end with a long time .

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Linetype scale
« Reply #16 on: April 30, 2014, 01:21:48 AM »
And there is still my original question .. What individual LTScale will be used for differing line lengths.
At a guess I'd say the object ltscale should be 1.0 for all objects longer than the linetype's pattern-length. And the (segment-length ÷ pattern-length) for all objects shorter. That should display at least one set of dashes & dots no matter how long a line is. But these lengths are affected by 3 things:
  • The global LTScale value, only if 1.0 doesn't it affect anything
  • If the PSLTScale = 1, then the viewport's zoom factor affects linetype pattern lengths. Then what about the situation where the line is visible in 2 / more VPs at different zoom factors? Should the widest zoom be used to calculate this, or would that start looking weird?
  • If using Annotative Scaling, is the MSLTScale = 1. Is the viewports set to a CAnnoScale? Then the same principles apply as per (2) above.

And as mentioned, this only applies to lines. Some more needs to be done for other objects. E.g. what about polylines ... they could have short sectors, but their object LTS is set for the entire PL - should LTGen be turned on for these? Things like blocks may even throw another spanner into the works with their own scale factor per instance. It can get to a very complicated permutation of scaling factors, 2 or 3 levels deep. There are probably other issues which may need further clarification, but I can't think of much more for now.

So yes, the OP needs to answer some questions before any further coding could be written. The code I posted is simply a starting point to show what "can" be done.

I've found that usually when making an addon / full program you always start with these incomplete specifications. It's very seldom that an OP / boss / client has a complete idea regarding what they actually want. It's usually some vague notion of "Can such be done?" And as something gets developed it then also fleshes out the spec, since only once they notice how things intertwine do they realise what they're after.

The previous paragraph is my most important reason for encouraging any poster to start learning to make these things for themselves. Much easier and faster to do something exactly as you want it instead of trying to explain to someone else about something you (and possibly them too) hardly understand.

   Thank you all very much for your attention and I apologize for my late reply.  irneb,The method of your code is nice . In fact , There is just a feeling about the scales to me, many changes and condition . Luckily, I had resolved it by myself in the end with a long time .
That's great! This is the best way of going about it ... doing it yourself or modifying something to suit your needs.

Could I just request that you post your solution here? For others who may have similar problems in the future?
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.