Recent Posts

Pages: [1] 2 3 ... 10
1
You are never sure what Autodesk do in the future :-)

But Cuix files are actually Zip-files that contain CUI files and bitmaps. The same system that Docx and Xlsx uses. So that is quite common and I can't find a reason to change this. Only Autodesk might come with new tags or options inside the CUI system.

Compare this with Lisp: Lisp files are also backwards compatible but if you call a newer system variable then there will be an error message.
2
Updating this question for the year 2013..!

.cuix files made in Autocad 2013 still seem to work in 2010.  Is this behaviour guaranteed?  Will it continue to be guaranteed with 2014, 2015 etc..?
3
AutoLISP (Vanilla / Visual) / Re: Manipulate dynamic blocks by code
« Last post by Lee Mac on Today at 05:16:25 am »
You might find these functions helpful: Dynamic Block Functions
4
Where can i find DynDraw.arx for autocad2014 version ?
thanks a lot. :|
As usually last version of DynDraw can be downloaded from http://www.maestrogroup.com.ua/support/dyndraw.zip
DynDraw2013x32.arx and DynDraw2013x64.arx have to work with AutoCAD 2014.
5
AutoLISP (Vanilla / Visual) / Re: automatizeing refedit
« Last post by S.Langhammer on Today at 02:58:19 am »
By now I properly inserted your code (decided for the vlax-for method) and it does exactly, what I needed it to do!
Do you have a Website? Or any way I could donate to some PayPal account or something? you helped me out so much up until now and help me understand Lisp a lot better, than I did in the begining, that I just wanna repay you somehow.
6
AutoLISP (Vanilla / Visual) / Manipulate dynamic blocks by code
« Last post by FAR on Today at 02:56:18 am »
I am trying to insert a Dynamic block and manipulate its parameters programmaticaly:  'width', 'length', etc...
The block has linear parameters and stretch actions.  After inserting the block, how can I, by using lisp, update the specific parameters value to get it properly displayed
Your support is really appreciated. Thanks
7
.NET / Re: AutoCAD API Wishlist Survey 2013
« Last post by Kerry on Today at 02:36:59 am »
Do they have a survey on their survey? How about - "start at the beginning and not at the end". We all know what "Submit" means, right? (see pic of the first screen of the survey) Apparently not. Sheesh.

My first impression of the survey from that first screen was "huh? No questions? I must have missed it." My second impression is that they really didn't ask many questions, apart from asking me to identify myself twice.

Yeah, I'm being nitpicky but it's a good example of how Autodesk just don't relate to the user-experience expectations, or the priorities, that the rest of us take for granted. The AutoCAD user interface's departures from Microsoft's user interface guidelines and their API's ever-changing ways are other great examples of this.

Their surveys are more-or-less kabuki dances.

Their marketing objectives define what they do, and the customer's opinion doesn't really come into play. For API related issues, it never has. Their API development has always been driven by their own internal functional requirements and little more than that.

I agree 100% with that summation.
We only need to look back over the published results for last several years to deduce that the API user is largely ignored.


8
I'm seeing more and more people complain about these things. None of the "solutions" are perfect, and some are lots of work - usually in a inverse-relationship.

Here're the solutions I've seen so far (listed from least work and least possibility of success):
(1) The issue with such "hacked together" driver is that it needs to be done to each workstation. And of course could easily be messed up on one or more through a slight mistype / some other setting which might differ.

(2) Could you perhaps use DotNet to connect to the DB? I think the DotNet connections don't worry about 32/64 bit incompatibilities. You could add some lispfunctions in your DotNet DLL so your lisps handle the DWG and UI interaction with ACad, and the DLL only handles linking, sending & retrieving data from the DB.

(3) Or could you translate your DB from Access to something else? If you don't want to install a server on a dedicated machine and want to stick with a normal file based DB, then you could try using DBase / Paradox files instead - there are ODBC drivers for those, and (especially DBase) has many import / export filters in nearly all programs.

(4) Or try SQLite through nullptr's awesome tool: http://www.theswamp.org/index.php?topic=28286.45

(5) I'd avise using a true DB Server instead of Access (or some other file-based DB) if you're going to have more than one person linking to it at once (I've had numerous issues with corrupt MDB files due to multiple concurent edits). Perhaps try something like Ms-SQL Server Express, or MySQL, or PostGre, or FireBird, or any of a number of others (I prefer PostGre / FireBird as it's Open Source and free, has more control than even MS-SQL, and can run on any operating system {Win/Linux/Mac/BSD/Unix} - so the "server" could be some old PC brought to life again).

Note that even Access can be used as the client side into any of these DB servers - so you could still use the forms / reports / queries you've built in Access to work with your data. It's just that your tables would be linked tables instead of directly saved into the MDB file. Or you could use LibreOffice Base instead of Access, as its got native drivers for most of these as well as ODBC / JDBC drivers if not native - another free program which runs on any OS.
9
AutoLISP (Vanilla / Visual) / Re: automatizeing refedit
« Last post by S.Langhammer on Today at 01:45:38 am »
Whoops!
Clicking it didn't redirect me straight to the entry in the Lisp help, like for example clicking defun. So I thought it wasn't in the list.
My bad!
10
AutoLISP (Vanilla / Visual) / Re: Under dialog how can I start them
« Last post by cadplayer on Today at 01:18:24 am »
My next try show that I get a dialog, where I can "Add" something in the dialog. But if I press than ok the dialog close with "error: bad argument type: stringp nil"
I want that the dialog still show new adding things.

Code: [Select]
;; function trims text lines
(defun _strtrim (s delims / len s1 i c lst)
  (setq delims (vl-string->list delims)
len (strlen s)
s1 ""
i (1+ len))
  (while (> (setq i (1- i)) 0)
    (setq c (substr s i 1))
    (if (member (ascii c) delims)
      (if (/= s1 "") ; no null tokens
        (setq lst (cons s1 lst)
      s1 "")
)
      (setq s1 (strcat c s1))
      )
    )
  (if (/= s1 "")
    (cons s1 lst)  ; no ("" "1" "2")!
    lst
    )
  )

;; function read csv-files
(defun _ReadCSV ( filename / _csv->lst file line)

  (defun _csv->lst ( str / pos )
    (if (setq pos (vl-string-position 44 str))
      (cons (substr str 1 pos) (_csv->lst (substr str (+ pos 2))))
      (list str)
      )
    )

  (if (setq file (open filename "r"))
    (progn
      (while (setq line (read-line file))
        (setq lst (cons (_csv->lst line) lst))
        )
      (close file)
      )
    )
  (setq lst (reverse lst))
  )



(defun c:test ( / file tmp dch return)
  (cond
    (
      (not
        (and (setq file (open (setq tmp (vl-filename-mktemp nil nil ".dcl")) "w"))
          (write-line "
  CHAN : dialog {label = \"NOTES\";
       : list_box {label = \"Choose Selection :\";key = \"selections\";height = 12;}
       : list_box {label = \"Preview :\";key = \"preview\";width = 50;height = 5;}
       : boxed_row {
                 : button {key = \"Okay\";label = \" Okay \";is_default = true;}
         : button {key = \"Cancel\";label = \" Cancel \";is_default = false;is_cancel = true;}
         : button {key = \"Add\";label = \" Add \";is_default = false;is_cancel = true;}
         }
       }
   ADD : dialog {label = \"Add\";
       : row {
       : edit_box {key = \"Selection\";label = \"Selection:\";edit_width = 25;height = 1;value = \"\";}
            }
       : edit_box {key = \"Preview\";label = \"Preview:\";edit_width = 25;height = 1;value = \"\";}
       ok_cancel;
       } "
                      file
                      )
             (not (close file))
             )
        )
      )
    )
 
  ;; Run Dcl menu dialog
  (if (<= (setq dcl_id (load_dialog tmp)) 0)
    (alert "Error loading DCL file.")
    )
  (if (not (new_dialog "CHAN" dcl_id))
    (alert "Error loading  dialog.")
    )
  (princ)
 
 
  ;; function selects tabell
  ;; read in dialog
  (if (null NAMES)
    (setq NAMES (list '("1" "TEST1") '("2" "TEST2") '("3" "TEST3"))) ;testweise
    )
   
  (start_list "selections")
  (mapcar ' add_list (mapcar 'car NAMES))
  (end_list)
  (action_tile "selections" (strcat "(progn (setq SIZ $value)"
                                    "(start_list \"preview\")"
                                    "(mapcar ' add_list (setq txt (cdr (assoc (nth (atoi siz)(mapcar 'car NAMES))NAMES))))"
                                    "(end_list)"
                                    "(mode_tile \"accept\" 2))"
                            )
  )
  (action_tile "Okay" (strcat "(progn "
"(setq txt (car txt))"
"(done_dialog 1))"
                        )
  )
  (action_tile "cancel" "(done_dialog 0)")
 
  (action_tile "Add" (strcat "(if (<= (setq dcl_id (load_dialog tmp)) 0)
                               (alert \"Error loading DCL file.\")
                               )"
                             "(if (not (new_dialog \"ADD\" dcl_id))
                               (alert \"Error loading  dialog.\")
                               )
                             (start_dialog)"
                     )
  )

  (setq res (start_dialog))
  (unload_dialog dcl_id)
  (if (= res 1)
    (progn
      (SETVAR "ORTHOMODE" 0)
      (SETVAR "OSMODE" 512)
      (SETVAR "DIMTAD" 0) 
;;;      (PRINC "\nSelect  1ST & 2nd point of leader")
;;;      (COMMAND "DIM" "LEADER"  PAUSE PAUSE "" txt "EXIT")
      (initget "t l ")
      (if (setq a (getkword "\nDo you want a [T]ext or a [L]eader ? "))
        (cond ((= a "l")
               (while (setq pt (getpoint "\nPick a Leader Insert Point ! "))
                 (command "._mleader" "_non" pt pause txt)
                 )
               )
              (T (while (setq pt (getpoint "\nPick a Text Insert Point ! "))
                   (command "mtext" pt "w" "0" txt "" )
                   )
               )
              )
            )
      (SETVAR "DIMTAD" 1)
      (SETVAR "OSMODE" 107)))
  (vl-file-delete fname)
  (princ)
  )
(prompt "\n\t---\tStart command with TEST\t---")
(prin1)




[Edit]
Type in "test", it must open dialog "Notes" and than try to add something. Here I need help.
After typing new values in Add-dialog I want show values in dialog "Notes" (how).
Pages: [1] 2 3 ... 10