Recent Posts

Pages: [1] 2 3 ... 10
1
The simplest way is to use runas.exe
2
AutoLISP (Vanilla / Visual) / Re: Reactive point on body of entity?
« Last post by ribarm on Today at 01:20:50 pm »
After some very deep thinking, I've found solution that looks dumb, but on the other hand, when modelling is the task, it looks very promising... As I said its very simple... I've added this 2 codes into my startup :

Code: [Select]
(defun c:m0 nil
  (entmake (list '(0 . "LINE") '(10 0.0 0.0 0.0) '(11 0.0 0.0 0.0)))
  (princ)
)

Code: [Select]
(defun c:d0 ( / ss i li )
  (if (setq ss (ssget "_X" '((0 . "LINE"))))
    (repeat (setq i (sslength ss))
      (setq li (ssname ss (setq i (1- i))))
      (if (equal (cdr (assoc 10 (entget li))) (cdr (assoc 11 (entget li))) 1e-50)
        (entdel li)
      )
    )
  )
  (princ)
)

So now when I create some 3D xref or 3D block, its necessary to type first "d0", zoom extents and type "m0" and that's it... Now REFEDITBYNAME will always work as it is like I posted... At the end when modelling is finished and xrefs are bind and exploded as also blocks are exploded you just need to type "d0" and zoom extents... Finished...

If this method is somewhat stupid and you have something to say to me, please don't hesitate... I know its dumb, but I think that some sort of compromise had to be made ab this subject... Few extra steps, but if correctly stick with procedure, success is the award by my humble opinion...
3
AutoLISP (Vanilla / Visual) / Re: Point to LAT LON
« Last post by ymg on Today at 10:55:20 am »
divtply,

Your suggestion works also, but this is a carry over from the day of hand calculator.

Angtof returns the result in radians, and the OP needs results in decimal degree.

ymg
4
.NET / Re: bugs for a sticker
« Last post by nekitip on Today at 09:11:42 am »
Incorrect polyline Area value returned by .NET API
To reproduce:
draw polyline in a form of number 8 in autocad, read entity Area property in .NET and returning value is wrong.
It is wrong for all self-intersecting polylines and some (hard to tell which) of the non closed ones.
Shrot solution:
read values from COM object
Code - C#: [Select]
  1.            public static double GetArea(this Polyline pline)
  2.           {
  3.               dynamic pl = pline.AcadObject;
  4.               return (double)pl.Area;
  5.           }
  6.  
Longer solution:
since reading com this way is about two times slower, doesn't work well in overrules, then you can read only if you are sure object is self-intersected or non closed (some non closed plines are good for read directly from .NET but hard to tell when. Please share if you know solution)

Also, I ask everyone to share your findings about other unexpected and undocumented bugs and behaviour.

5

Firstly Scale has nothing to do with the dimension text value.

You will need to override the text value with modified text.
Dear Kerry thank you for helping me. I know how to override the scale but I don't know how to select all dimension entities and introduce the IF instance or create another dimension style and auto switch it.
Strange is it may seem what the OP wants is standard for German architectural drawings and there are developers who have made quite a buck selling reactor based programs to accomplish this.

Dear Roy, I am also from EU, however in my country you can draw all dimensions in cm and specify at the bottom that all dimensions are in cm, this is the case for reinforced concrete. I don't consider that there is too much code to accomplish what I need.

Wish you both nice Christmas holidays!
6
AutoLISP (Vanilla / Visual) / Re: Reactive point on body of entity?
« Last post by ribarm on Today at 08:12:02 am »
Roy, can you explain how you obtained that posted list from 3DSOLID... As for your info ab many issues that needs to be considered, I mean to only improve refeditbyname in that way it can handle Xrefs with only 3DSOLIDS or curves or 3DSOLIDS with curves... As for frozen layers, you are right, but some entity in reference is needed to be thawed - otherwise - complete Xref would be uneditable... In my refeditbyname I should perform (command "_.-REFEDIT" pt "Ok") with each entity in definition - some of them in reference must be visible, so picking by name will be possible... I am interested in this as I may use Xrefs with 3DSOLIDs while my modelling work, and it would be nice if I could refedit them by name... I am planing to use only Xrefs that don't contain nesting of other type entities - so "Ok" will be just fine, and as I said texts are not important for my job right now, but if its possible why not improve it and for this situations... Zooming will be just extents of found Xref/Block reference that is editable, so that's not big deal... I've added (command "_.ZOOM" "_O" ref "") line inside refeditbyname.lsp, it should work as desired...
7
AutoLISP (Vanilla / Visual) / Re: Reactive point on body of entity?
« Last post by roy_043 on Today at 07:30:49 am »
To find these points for 3D solids inside a block definition you obviously cannot rely on command calls. But if you look through an entity list of a 3D solid you can find point values.
Code: [Select]
...
(1 . "point $-1 -1 $-1 2345.9455475743089 1855.0536092334189 0.45174828767022246 #")
...

But even if you solve this there other issues that need to be addressed:
1.
Zoom to the reference? Will there be clutter there?
2.
What if the first curve inside the block is on a frozen layer?
3.
What if the block definition contains only nested inserts or only texts?
4.
What if the block definition only occurs as nested inserts.
5.
The reason you are required to select a point is to determine the nesting level for the _REFEDIT command. How would you handle that?

I personally would not invest time in trying to enhance the _REFEDIT command in this manner.
8
AutoLISP (Vanilla / Visual) / Re: Reactive point on body of entity?
« Last post by ribarm on Today at 07:19:52 am »
I think there is some confusion about the term 'reactive point'. What ribarm means by this term is a point on an entity that can be used to select it (a clickable point). At least that is what I think he means. This has nothing to do with Xdata.

Yes Roy, I mean clickable point...
9
AutoLISP (Vanilla / Visual) / Re: Point to LAT LON
« Last post by divtiply on Today at 07:19:46 am »
Code - Auto/Visual Lisp: [Select]
  1. (defun todec (int / str len d m s)
  2.   (setq str (itoa int)
  3. len (strlen str)
  4.   s (atof (substr str (- len 2)))
  5.   m (atof (substr str (- len 3) 2))
  6.   d (atof (substr str 1 (- len 4)))
  7.   )
  8.   (+ d (/ (+ m  (/ s 60)) 60))
  9. )
  10.  

Why not angtof/angtos?
10
AutoLISP (Vanilla / Visual) / Re: Reactive point on body of entity?
« Last post by roy_043 on Today at 07:11:27 am »
I think there is some confusion about the term 'reactive point'. What ribarm means by this term is a point on an entity that can be used to select it (a clickable point). At least that is what I think he means. This has nothing to do with Xdata.
Pages: [1] 2 3 ... 10