Recent Posts

Pages: 1 2 [3] 4 5 ... 10
AutoLISP (Vanilla / Visual) / Re: Extract data from HTML-tables
« Last post by Peter2 on July 27, 2017, 03:10:55 am »
Thanks to all.
At the moment it seems that I can avoid the HTML-extract, but I will keep (I will try to ...) the infos in mind for the next time.
AutoLISP (Vanilla / Visual) / Basic question relating "methods" (Active X)
« Last post by Peter2 on July 27, 2017, 03:05:18 am »
Dumping an AECC_Sample_Line I get this results:

Code: [Select]
; IAeccSampleLine: IAeccSampleLine-Schnittstelle
; Eigenschaftswerte:
;   Application (RO) = #<VLA-OBJECT IAeccApplication 0000021ee894f890>
;   Description = ""
; Unterstützte Methoden:
;   ArrayPolar (3)
;   IntersectWith (2)

I could not find any information about the IntersectWith-method for AECC_Sample_Line, but there is the "common" function "vla-IntersectWith". Based on this example my question is:

Are methods always "common" and supported by some /many / all objects, or are they depending on the particular object (so "vla-intersect" is not the same as "AECC_Sample_Line IntersectWith")??

Thanks for basic lessons ;-)
AutoLISP (Vanilla / Visual) / Re: better coding...
« Last post by kdub on July 26, 2017, 11:55:57 pm »

... and because repeat expects an integer, ..
this will fall on its head if either parameter ( x_length OR x_dist ) is a real ; so val will be a real
(repeat (1- val)
AutoLISP (Vanilla / Visual) / Re: better coding...
« Last post by kdub on July 26, 2017, 11:40:49 pm »

This is what happens without decent documentation -->

(_splitdist 130 45)
     returns : (65 130)

(_splitdist 260 45)
     returns (52 104 156 208 260)

(split-dist 130 45)
     (45 45 45)

(_splitdist 400 47)
     returns (50 100 150 200 250 300 350 400)

This is not in conformance with the example result you posted ie
'(8.51063  17.0326 25.5432 .....)

For someone who claims to be a professional programmer this is abysmal.
If you expect help at least make an attempt to define the problem correctly.
AutoLISP (Vanilla / Visual) / Re: better coding...
« Last post by hugha on July 26, 2017, 10:28:09 pm »
Just pointing out that if len is very large compared to dis you may suffer floating point rounding error from the many successive subtractions of a small number from a large one.

Better to precalculate N = the number of points to generate and result = list(N*dis   (N-1)*dis   ....   dis).

Hugh Adamson

AutoLISP (Vanilla / Visual) / Re: OVLIDE a new online lisp editor
« Last post by Andrea on July 26, 2017, 05:13:55 pm »

I didn't know about lisplink,...never use it.

the "load into application" will be there,..this is a must.
but, will provide much more in the future..

below, a simple current screenshot tooked few min ago..
we are actually implementing diffrent coloration text, and making few basic tests.

if you have any idea to share,..please don't be shy.
AutoLISP (Vanilla / Visual) / Re: OVLIDE a new online lisp editor
« Last post by PKENEWELL on July 26, 2017, 03:55:28 pm »
Thank you Bilancikur

You are right, My Idea is to provide an online Lisp Editor for CAD.
similar to codeanywhere or icecode, however,.. these do not provide lisp coding...
evenmore, do not allow to be connected directly to the user cad program.
my idea is to create an editor able to shared with other programmer their project and use it as partnership concept.

this editor is in a test mode actually and will provide basic function for the first release.
also, we will try to implement diffrent compilator mode and iseful function like patenthese lookup etc..
I'm curious to know what can be done and always push my imagination foward. :)

thank you for sharing this new idea.

ps: are you Christopher ?

Andrea: An older editor called LispLink used to have the functionality of loading the lisp file being edited into the CAD Application or loading a selection of text into the application. LispLink is now defunct (unfortunately the owner passed away), but the concept is almost as good in my opinion as directly working in the application. VLIDE with the direct step into is the best, but I would be happy to have a "Load into application" button in the editor.

Just an Idea / Thought for you.
AutoLISP (Vanilla / Visual) / Re: How many Pendrive
« Last post by PKENEWELL on July 26, 2017, 03:45:16 pm »
The Answer is: Not exactly...

Using the (vlax-create-object "Scripting.FileSystemObject") you can get the property "DriveType". A return value of 1 means the Drive is a "Removable" drive. However - there are more things than stick drives that will come up with that designation. Anything that holds storage, such as a phone or an SD drive will also return this value.
AutoLISP (Vanilla / Visual) / Re: Selection set
« Last post by PKENEWELL on July 26, 2017, 03:19:08 pm »
Here's and oldie from my CAD library. Change the line with (setq ss (ssget "CP" ptlst)) to "WP" to select all inside only. You can also increase or decrease the accuracy by changing the value of the "inc" variable.
Code - Auto/Visual Lisp: [Select]
  1. ;; ----- (pjk-ssget-cir [Entity Name]) ----------------
  2. ;; This function selects all the objects within or crossing a
  3. ;; circle with the [Entity Name] given. Returns the resulting
  4. ;; selection set.
  5. (defun pjk-ssget-cir (enam / cnt cen elst ful inc pt ptlst rad ss)
  6. (if enam
  7. (setq elst (entget enam) ptlst nil
  8. cen (trans (cdr (assoc 10 elst)) enam 0)
  9. rad (cdr (assoc 40 elst))
  10.                                inc 1.0
  11.                                ful (/ 360.0 inc)
  12. cnt 0.0
  13. )
  14. ;; Created a Point list for 360 points on curcumference of
  15. ;; the circle to use with "Crossing Polygon" selection.
  16. (while (< cnt ful)
  17. (setq pt (polar cen (pjk-dtr cnt) rad)
  18. ptlst (cons pt ptlst)
  19. cnt (+ inc cnt)
  20. )
  21. )
  22. (reverse ptlst)
  23. ;; Delete the circle.
  24. (entdel enam)
  25. ;; Select by Crossing polygon.
  26. (setq ss (ssget "CP" ptlst))
  27. ;; Undelete the Circle.
  28. (entdel enam)
  29. ss
  30. )
  31. nil
  32. )
  33. ) ;; End Function (pjk-ssget-cir)
CAD General / Re: Drones on projects
« Last post by MSTG007 on July 26, 2017, 03:13:50 pm »
I understand the Drones with privacy but what about "scanners" in general?
Pages: 1 2 [3] 4 5 ... 10