Jump to content

Search the Community

Showing results for tags 'samifox'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. hi, i've written some input validation code, and i wonder what is really required to code and what can be handled by the autolisp *error* function. secondly, for readability sake, since the validation code is long i were thinking to link it from a different sub-function . is this a good idea? (this function is not going to interact with the user so i didnt use the getinit codes) Thanks Shay ;;;--------------------------------------------------------------------; ;;; Function: setEntSeg(ent typ max min) ; ;;; Vesion: 0.0 ;;; Creation: ;;; Update: ;;; Sub-function : 3DTO2DpONIT() ;;; ; ;;; Description: divids entity into segments while maintaining ;;; typ segment length. when total length cannot be ;;; divided without a reminder. last segments being handled ;;; according to min max parameters. ;;; ;;; ; ;;; Arguments: ; ;;; typ = typical segment length. ; ;;; mn = integer. minimum length allowed. ; ;;; mx = integer. maximum length allowed. ; ;;; ; ;;; Returned Value: A list of 2d coordinates represanting the ;;; new segments. ;;; ; ;;; Usage: ; ;;; ; ;;;--------------------------------------------------------------------; (defun setEntSeg (ent mn typ mx / plst y x cnt ang) (if (= (cdr (assoc 0 ent)) "LWPOLYLINE") (if (not (and (zerop mn) (zerop typ) (zerop mx))) (if (and (or (= (type typ) 'INT)) (or (= (type mn) 'INT)) (or (= (type mx) 'INT)) ) (if (not (and (minusp mn) (minusp mx))) (if (and (> mx typ) (< mn typ)) (princ "input is valid\n") (princ "iilegeal values, make sure mx is greater than typ and mn is smaller than typ\n" ) ) (princ "negative values are not allowed\n") ) (princ "mn and/or mx must be integer\n") ) (princ "zero is not allowed/n") ) (princ "function works only with lwpolyline\n") ) (princ) ) (defun test () (setq ent (entmake (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 90 2) (cons 10 (list 0 0)) (cons 10 (list 100 100)) (cons 210 (list 0 0 1)) ) ) ) (setEntSeg ent 6 6 6) )
×
×
  • Create New...