Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/05/2020 in all areas

  1. You can actually achieve this with a self-referencing text field (though, this has to be created programmatically): (defun c:test ( / o p ) (if (setq p (getpoint "\nSpecify insertion point: ")) (progn (setq o (vla-addtext (vlax-get-property (LM:acdoc) (if (= 1 (getvar 'cvport)) 'paperspace 'modelspace ) ) " " (vlax-3D-point (trans p 1 0)) (getvar 'textsize) ) ) (vla-put-textstring o (strcat "%<\\AcObjProp Object(%<\\_ObjId " (LM:objectid o) ">%).InsertionPoint \\f \"%lu2%pt3%pr1\">%" ) ) (vla-regen (LM:acdoc) acactiveviewport) ) ) (princ) ) ;; ObjectID - Lee Mac ;; Returns a string containing the ObjectID of a supplied VLA-Object ;; Compatible with 32-bit & 64-bit systems (defun LM:objectid ( obj ) (eval (list 'defun 'LM:objectid '( obj ) (if (vlax-method-applicable-p (vla-get-utility (LM:acdoc)) 'getobjectidstring) (list 'vla-getobjectidstring (vla-get-utility (LM:acdoc)) 'obj ':vlax-false) '(itoa (vla-get-objectid obj)) ) ) ) (LM:objectid obj) ) ;; Active Document - Lee Mac ;; Returns the VLA Active Document Object (defun LM:acdoc nil (eval (list 'defun 'LM:acdoc 'nil (vla-get-activedocument (vlax-get-acad-object)))) (LM:acdoc) ) (vl-load-com) (princ)
    2 points
  2. 1 point
  3. The blackboard is one way http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-4E317058-1E6A-45E2-A9BE-71D63D2D0A33 The setenv is another.
    1 point
  4. A global variable will remain till you close Autocad or if you change dwgs your global value will not be in the current dwg. Going back it will be there. There are ways though to get around this.
    1 point
  5. That is exactly the correct solution.
    1 point
  6. before slash : arguments to send to the defun after slash : such variables c and d are local , so it will set to nil or lost it's value when the defun ends 2: to avoid other lisp to get such value from one to another 3: if you don't care the variable would interfere in other lisp
    1 point
  7. I have both the cube and the navigation bar shown on the right side of my drawing. Both of them are "grey out" and I cannot click on the buttons. When I click on it, I actually clicked on my drawing and ended up selecting objects on my drawing. Do I have to turn it "on" or something? Thanks.
    1 point
  8. Both nvabar and navcube were set to ON. I have both of them on the screen but cannot click on to any of them.
    1 point
  9. Done but still can't click on the buttons on the navigation bar.
    1 point
×
×
  • Create New...