Jump to content

Search the Community

Showing results for tags 'counter'.

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

  1. I am trying to script a counter of specific strings. How can I select all occurrences of text that has a specific value? I cannot use filter or quickselect, and I cannot get selection sets to find specified values. Any help would be greatly appreciated. I am using ACADE 2015.
  2. Hello all! Let me first say that I've been looking through some of the threads on this forum and am blown away by the knowledge and creativity some of you possess. It's ridiculous the things you guys are able to do with AutoCAD. With that said, I'm hoping someone can help me solve a difficult problem I've been having. I've never created dynamic blocks and am learning as I go. I've scoured the internet looking for the answer for my needs and have experimented for hours but am still left without a working block. --A quick note before I begin, I'm using AutoCAD LT 2016 for all of this-- What I'm trying to do is create a dynamic solar panel block that can accomplish three things: 1. Dynamically fill a distance (up to 310' for fire code) with solar panels 2. Have three visibility states representing different angles for the solar panels 3. Have a solar panel counter that is visible within the properties but doesn't actually show up in the model Bonus: Dynamically fill an area with solar panels with the same requirements So far I've been able to accomplish #1 and #2 but to a limited degree. I can fill a distance just fine but if I change visibility states, the length is reset back to it's original. I need to be able to change visibility states without the length going away. #3 is the real problem. I have tried dozens of Attribute Definition combinations but can't seem to find one that works. The bonus would be nice to accomplish and I was able to do so with some success but didn't try to implement the visibility states or counter given the difficulty I've found just trying to make the lengthening block. I'm sure there are those of you that could create my block in no time at all and while I do appreciate that, what I'm really wanting is to learn what mistakes I'm making and how to do fix them myself. I've attached both the block that I've made as well as a file (posted on this very forum) that essentially recreates what I'm trying to accomplish (with a few tweaks e.g. I'm limited to using architectural units and I don't want a visible counter). Any help or direction would be greatly appreciated! chairtest.dwg Fixed Solar Module 1.dwg
  3. I've spent some time writing up the following tutorial which aims to demonstrate how to construct a simple block counter and in the process give the user an introduction to association lists and dotted pairs: Building Association Lists: A Simple Block Counter The tutorial is a step-by-step walkthrough of the process of creating the block counter, with diversions here and there to explain the various concepts used by the program. Throughout the tutorial I've also tried to explain why every part of the code is used in the way that it is, rather than providing the reader with a block of code and leaving some parts without an explanation (for example, why the program should include (princ) or (prin1) as the last expression etc.). I welcome your feedback on the tutorial - Is it too simplified? Is it too long? Too boring? All of the above? Feel free to also point out any typos, as these can be difficult to spot when proof-reading your own work. Thanks, Lee
  4. I wanted to create a new thread since it's a different problem even though it is from a previous thread. Since I never know how many instances of a font that needs changing (SLDTEXTSTYLE) I wanted to create a counter. http://www.cadtutor.net/forum/showthread.php?91375http:// Digging around I found a way to create my counter number from this thread: http://www.cadtutor.net/forum/archive/index.php/t-76290.html How do I make the CNT a subroutine and call it from C:SWT (defun c:cnt () (setq la (cdr (assoc 2 (tblnext "STYLE" T)))) (setq lal (list la)) (while (/= (setq la (cdr (assoc 2 (tblnext "STYLE")))) nil) (setq lal (append lal (list la)) ) ) (setq LEN (length lal)) ) (defun c:swt (/ i s) (Princ "\nFinds all SW Text Styles, replaces with ROMANS Font:") (if (not (tblsearch "STYLE" "ROMANS")) (progn (command "_.STYLE" "ROMANS" "ROMANS") (while (> (getvar "CMDACTIVE") 0) (command "")))) (setq i 0) (repeat 9 ; All my LEN from the subroutine here? (setq s (strcat "SLDTEXTSTYLE" (itoa i))) (if (tblsearch "STYLE" s) (progn (command "_.STYLE" s "ROMANS") (while (> (getvar "CMDACTIVE") 0) (command "")))) (setq i (1+ i))) (princ)) And of course if there is a "better way" I'm always open to that too!! Thanks Much!
×
×
  • Create New...