Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/02/2022 in all areas

  1. You can use the function vlax-curve-getclosestpointto to check if the distance between the picked point and closest point to object is equal to zero then its on otherwise its not.
    2 points
  2. Cyberangel good idea set up a template. It holds lots of other stuff you want as standard in your dwg's.
    2 points
  3. Just to clarify, BigAl's suggestion is good for setting up a particular viewport. You can turn layers on and off in that viewport only, even change the color and linetype for a layer, without affecting those properties anywhere else. Those settings will remain that way until you change them again. What DagDad is suggesting, I believe, is to save your layer states for each sheet so that you can duplicate them in another project. When you open the Layer States Manager window, you have the option to save the layer state of the active window (model space, paper space, or any viewport) as an independent file. You can then import that file into another drawing without having to redefine the layer state from scratch. Another option is to create a drawing template that already has the layer state defined for each layout, so you skip over all those steps for setting up a project and get straight to work. If this doesn't clarify the issue, OP, let me know. Also tell me if I misunderstood your comments, BigAl and DagDad.
    2 points
  4. Perfect! Thank you again good sir for all of your help.
    1 point
  5. You need to convert the entity selected 'ss' to vla-object. (vla-get-ObjectId (vlax-ename->vla-object SS)) Besides that, you don't the tablesearch expression that assigned to variable 'sss'
    1 point
  6. One of your blocks doesn't have a link and held me up for 30 mins tying to fig out why it kept giving me an error. ;; Write list of unique details to csv file in dwg folder (defun C:DBEXT (/ ss ent blk x hyprlnk link lst file itm) (vl-load-com) (if (setq ss (ssget "_X" '((0 . "INSERT") (2 . "DetailBubble")))) (progn (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (setq blk (vlax-ename->vla-object ent)) (setq x (strcat (LM:vl-getattributevalue blk "DETAIL_NUMBER") "-" (LM:vl-getattributevalue blk "SHEET_NUMBER"))) (setq hyprlnk (vlax-get-property blk 'Hyperlinks)) (if (> (vlax-get-property hyprlnk 'Count) 0) (progn (setq hyprlnk (vla-item hyprlnk 0)) (setq link (vlax-get-property hyprlnk 'URL)) ) (setq link "Link Not Found") ) (or (assoc x lst) (setq lst (cons (cons x link) lst))) ) (setq lst (vl-sort lst '(lambda (a b) (< (car a) (car b)))) file (open (strcat (getvar 'DWGPREFIX) "_Details.csv") "w") ) (foreach itm lst (write-line (strcat (car itm) " - " (cdr itm)) file) ) (close file) (startapp "C:/Program Files (x86)/Microsoft Office/root/Office16/EXCEL.EXE" (strcat (getvar 'DWGPREFIX) "_Details.csv")) ) ) (princ "\nSaved Details CSV File!") (princ) ) ;; Get Attribute Value - Lee Mac ;; Returns the value held by the specified tag within the supplied block, if present. ;; blk - [vla] VLA Block Reference Object ;; tag - [str] Attribute TagString ;; Returns: [str] Attribute value, else nil if tag is not found. (defun LM:vl-getattributevalue ( blk tag ) (setq tag (strcase tag)) (vl-some '(lambda ( att ) (if (= tag (strcase (vla-get-tagstring att))) (vla-get-textstring att))) (vlax-invoke blk 'getattributes)) )
    1 point
  7. Steven P not sure about admin rights as I run on a laptop and that is it I am the company. Try it. The run the code in Notepad++ is an extension that you download once you have installed N++. Inside Acad/Bricscad just type N++ and it runs.
    1 point
  8. These are great, and Lee's arc version too.. Keep up the great work guys
    1 point
  9. System variables: ATTREQ & ATTDIA
    1 point
  10. Hi! I was wondering if there is a way i could create a custom line type that has marks on the ends( dots or a crossing line ) . I've had a problem with seeing the ends of lines in a continuous parallel polyline\lines. I need it for a comfortable work and it seems like the only way is to create a Line type for this. Any suggestions are really appreciated, If you have any ideas on how to do this or how to make ends visible without creating a linetype for this.
    1 point
  11. The simplest way of the lot is to do it right from the start set up your template with all the correct stuff, have some cheat objects nearby to use with the make current layer button, have your block library set right toolpalletes so stuff goes on correct layers. A real good one is a copy object lisp just looking for it you pick an existing object it sets everything then starts command. I had a client billion $ company their Cad manager removed the menus and rebuilt all menus to be corporate stds there was no obvious line command you drew an object from the menu's so no matter what world wide office or contractor every dwg was identical and all information was on correct layers. In a simple Architecture add on we did we adopted this approach if you drew a wall using our menu's it always went on the user defined layer & linetype & color etc.
    1 point
×
×
  • Create New...