Jump to content

Search the Community

Showing results for tags 'hatch rotation'.

  • 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 all, Here's a LISP that I'm having a problem with. Everything's working OK apart from getting the angle of the HATCH working. It doesn't work until I run it through a -hatchedit command. Is this a UCS problem? Drawing: Hatch Rotation Selection Issue.dwg LISP: (defun c:QSHLPASCB nil (c:QSHATCH_SAME_Layer_PatName_Rotation_PatScale_Color&BkgColor)) (defun c:QSHATCH_SAME_Layer_PatName_Rotation_PatScale_Color&BkgColor (/ bkgcol ent_1 laycolor layer nss patangle patname patscale ss_1 ssdata ) (while (not (and (setq ent_1 (car (entsel "\nSelect Hatch to get same Hatch entities as:\n\n- LAYER\n- PATTERN NAME\n- PATTERN ANGLE\n- PATTERN SCALE\n- COLOUR\n- BACKGROUND COLOUR\n-------------------------------------------------------------")) ssdata (if ent_1 (entget ent_1)) ) (= (cdr (assoc 0 ssdata)) "HATCH") (sssetfirst nil) (setq ss_1 (vlax-ename->vla-object ent_1)) (progn (setq bkgcol (vla-get-backgroundcolor ss_1) bkgcol (vla-get-ColorIndex (vla-get-BackgroundColor ss_1)) laycolor (vla-get-color ss_1) layer (vla-get-Layer ss_1) patname (vla-get-PatternName ss_1) patangle (vla-get-PatternAngle ss_1) patscale (vla-get-PatternScale ss_1) ss_1 (ssget "X" (vl-remove 'nil (list (cons 8 layer) '(0 . "HATCH") (cons 2 patname) (cons 52 patangle) (cons 62 laycolor) (cons 410 (getvar 'ctab)) (if (/= "SOLID" patname) (cons 41 patscale) ) ) ) ) nss (ssadd) ) (repeat (setq i (sslength ss_1)) (and (setq e (ssname ss_1 (setq i (1- i)))) (= bkgcol (vla-get-ColorIndex (vla-get-BackgroundColor (vlax-ename->vla-object e)))) (ssadd e nss) ) ) (princ (strcat "\n: ------------------------------\n <<< "(itoa (sslength ss_1)) (if (> (sslength ss_1) 1) " >>> similar HATCHES" " >>> similar HATCH") " selected.\n: ------------------------------\n")) (sssetfirst nil nss) ) ) ) ) (princ) )
×
×
  • Create New...