Jump to content

Search the Community

Showing results for tags 'intersecting'.

  • 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 2 results

  1. Hi, I tried to write an autolisp code and I got to a certain point, but it is not working as I wanted. I would like your suggestions and your support in revising the code. What I want to do is select a block. To find out which character (n) from the right is the "-" sign in the layer name of the line touching the block I selected. Then subtract 1 from this character(n) number and add n-1 from the right. Combining the part up to the character and the prefix text and writing to the block geometric point. The way this code works now is to combine the front text and the text to the right of the "-" sign of the last layer added to the layer list and write it to the center of the block. This wasn't something I wanted. (setq *textHeight* 8) (setq *layerName* "01 Equipment list 2") (setq *textColor* 1) ; (defun c:bs_ayar () (setq *textHeight* (getreal "\nEnter new text height: ")) (setq *layerName* (getstring "\nEnter new layer name: ")) (setq *textColor* (getint "\nEnter new color index (1 for Magenta): ")) (princ (strcat "\nText height is now " (rtos *textHeight*) ", layer name is " *layerName* ", color is " (itoa *textColor*) " was set to. ")) (princ) ) (defun c:bs4 () (setq prefix (getstring T "\nEnter prefix letter: ")) (setq blk (car (entsel "\nSelect Block: "))) (setq blkEnt (entget blk)) (setq insPt (cdr (assoc 10 blkEnt))) (setq ss (ssget "_X" (list (cons 0 "LINE,POLYLINE")))) (if (and ss (> (sslength ss) 0)) (progn (setq line (ssname ss 0)) (setq lineEnt (entget line)) (setq lineLayer (cdr (assoc 8 lineEnt))) (setq dashPos (vl-string-search "-" lineLayer)) (if dashPos (setq rightPart (substr lineLayer (+ dashPos 2))) (setq rightPart lineLayer) ) (command "._-LAYER" "_M" *layerName* "" "_C" *textColor* "" "") (command "._TEXT" insPt *textHeight* "" (strcat prefix rightPart)) (command "._-LAYER" "_S" *layerName* "") ) (princ "\nNo line or polyline was found touching the selected block.") ) (princ) )
  2. I am hoping this will be a simple fix, but searching for the answer has turned up nothing. If I offset a self-intersecting polyline, it trims the offset anywhere that it crosses the original polyline. I am looking for a way for the offset to continue through self intersections untrimmed. My hope is that the self-trimming is a "feature", and that there is a way to turn it off, perhaps through a system variable or something. If not, the only way I can think to fix it is to write my own custom offset which doesn't sound very efficient. ps. Although I'm posting this in the general autocad area, I'm open to solutions that require autolisp. The reason I'm looking for this answer is to be used in an automated routine once I get past this hurdle. ***edit*** I found this thread , but it doesn't give a solution (aside from "use an ancient version on AutoCAD").
×
×
  • Create New...