TuttoCAD Forum

TuttoCAD Forum
[ Home | Registrati | Discussioni Attive | Discussioni Recenti | Segnalibro | Msg privati | Sondaggi Attivi | Utenti | Album Fotografico | Download | | Cerca | FAQ ]
Nome Utente:
Password:
Salva Password
Password Dimenticata?

 Tutti i Forum
 1 - TuttoCAD Software
 AutoLISP
 Incremental Array
 Nuova Discussione  Rispondi
 Versione Stampabile Bookmark this Topic Aggiungi Segnalibro
I seguenti utenti stanno leggendo questo Forum Qui c'è:
Autore Discussione Precedente Discussione Discussione Successiva  

arri
Utente Master


Regione: Lombardia


14951 Messaggi

Inserito il - 25 agosto 2011 : 10:48:40  Mostra Profilo Invia a arri un Messaggio Privato  Rispondi Quotando
Incremental Array

Program Description

This program will array a selection of objects, whilst incrementing any numerical content found in objects containing text within the selection.

The program has two modes of operation: standard & dynamic. The standard mode: 'IncArray' will not display the dynamic preview, but in turn will run faster and smoother than the dynamic version - this difference is especially significant when attempting to array a large number of objects.

The dynamic mode: 'IncArrayD' will display a preview of the arrayed objects as the mouse is dragged across the screen. However, due to the method used to generate this preview, this mode is only suitable when using the program to array a small number of objects.

Upon starting the program, the user is prompted to make a selection of objects to array, this selection may include any drawing object excluding viewports. Following selection, the user should specify a base point and array vector relative to the base point. The angle and length of this vector will determine the direction and density of the array respectively; a shorter vector will result in a denser array.

The array may now be generated by dragging the mouse across the screen until the array reaches a desired size. If the object selection includes Text, MText, Attribute Definition, Dimension, or Multileader objects, any numerical data found in the text content of these objects will be incremented as the object is arrayed.

arri
Utente Master


Regione: Lombardia


14951 Messaggi

Inserito il - 10 gennaio 2013 : 10:27:19  Mostra Profilo Invia a arri un Messaggio Privato  Rispondi Quotando
Simple Numeric Array

; Example from book: Visual Lisp Programming
; NumRow.lsp by Cal Clater
;
; 1/12/xx
;
; Purpose: To create an evenly spaced row of incrementally increasing numbers,
; such as might be required for a chart or graph. The beginning number is zero
; and the last number is as specified.
;
(defun C:NumRow (/ PT1 DST DIR NN HN)
    (setvar "CMDECHO" 0) (setvar "BLIPMODE" 0)
    (princ "\nText will be center justified.")
    (setq PT1 (getpoint "\nstart point of number row: ")
          DST (getdist "\nDistance between number: ")
          DIR (getorient "\nAngle: ")
          NN 0
          HN (getint "\nNumber sequence to be 0 through: ")
    )
    (command "TEXT" "C" PT1 "" "" "0")
    (repeat HN
      (setq PT1 (polar PT1 DIR DST))
      (command "TEXT" "C" PT1 "" "" (itoa (setq NN (+ NN 1))))
    )
)
Torna all'inizio della Pagina

arri
Utente Master


Regione: Lombardia


14951 Messaggi

Inserito il - 10 gennaio 2013 : 11:38:04  Mostra Profilo Invia a arri un Messaggio Privato  Rispondi Quotando
Formatting numbers
Torna all'inizio della Pagina
  Discussione Precedente Discussione Discussione Successiva  
 Nuova Discussione  Rispondi
 Versione Stampabile Bookmark this Topic Aggiungi Segnalibro
Vai a:
TuttoCAD Forum © 2001-2010 CADLandia Torna all'inizio della Pagina
Pagina generata in 0,81 secondi.