Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/07/2018 in all areas

  1. You can use USERI1 in Field category Other as a DieselExpression, pasted in as $(getvar, USERI1) I'd still go with Custom Properties though.
    1 point
  2. Ok, now I get how this function works thanks to this code: (defun GetCustomInfo ( / Info Num Index Custom) (and (vl-load-com) (or *acad* (setq *acad* (vlax-get-acad-object))) (or *doc* (setq *doc* (vlax-get *acad* 'ActiveDocument))) (vlax-property-available-p *doc* 'SummaryInfo) (setq Info (vlax-get *doc* 'SummaryInfo)) (setq Num (vla-NumCustomInfo Info)) (setq Index 0) (repeat Num (vla-getCustomByIndex Info Index 'ID 'Value) (setq Custom (cons (cons ID Value) Custom)) (setq Index (1+ Index)) );repeat );and (if Custom (reverse Custom)) ); defun And this is mine: (vla-GetCustomByKey summaryInfo "n_alleggerimenti" 'Value) (IF (not Value) (progn (vla-AddCustomInfo summaryInfo "n_alleggerimenti" "xxxx") (vla-AddCustomInfo summaryInfo "n_gabbie" "xxxx") (vla-AddCustomInfo summaryInfo "incidenza_cls" "xxxx") ) ) Thank you all guys! <3<3<3<3<3<3
    1 point
  3. WOW!!! What kind of sorcery is that?? ahaha How can I set these "custom proprieties" by lisp? Thanks I found that (defun C:Test (/ App Doc DwgProps) (setq App (vlax-Get-Acad-Object) Doc (vla-Get-ActiveDocument App) DwgProps (vla-Get-SummaryInfo Doc)) (vla-AddCustomInfo DwgProps "n_gabbiess" "No Data") (vla-AddCustomInfo DwgProps "Sample2" "No Data") (vla-SetCustomByIndex DwgProps 0 "Sample1" "Some data") (vla-SetCustomByKey DwgProps "n_gabbie" "1234") (princ)) A little question: I want to insert a cycle to see if there are these values and if not create them.. I'm not able to get their value but only to set. I don't find the right syntax (IF (vla-GetCustomByKey summaryInfo "n_gabbie" 'value) (progn (vla-AddCustomInfo summaryInfo "n_alleggerimenti" "xxxx") (vla-AddCustomInfo summaryInfo "n_gabbie" "xxxx") (vla-AddCustomInfo summaryInfo "incidenza_cls" "xxxx") ) ) Looks like that in SummaryInfo there are any custom key :S But if I try to create them with the same name I get the error "already exist" (setq App (vlax-Get-Acad-Object) Doc (vla-Get-ActiveDocument App) summaryInfo (vla-Get-SummaryInfo Doc) )
    1 point
  4. You're right @MastroLube - I don't see the userX sysvars in the FIELD UI. But you can create the appropriate field like this: (setq ostr "%<\\AcVar useri1>%") (command "mtext" (getpoint) "w" "0" ostr "")
    1 point
  5. I have moved your thread to the AutoLISP, Visual LISP & DCL Forum.
    1 point
  6. You could try to retrieve ENAME, by using (handent) function : (handent "178AB78") - no need for (ssget) - each handle is unique to exactly 1 ename... Yes you're right USERS aren't persistent, and I think they have limitation of quantity of data they can hold... You could try to save data to variables, and then export variables to *.txt file, after which when you open new DWG you could load them and import in memory (atoms-family) as globals... You could try to automate importing, but exporting must be done manually - of course through lisp... See this : http://www.theswamp.org/index.php?topic=50628.msg557923#msg557923 HTH., M.R.
    1 point
  7. In short, no - not using standard functionality. There was a discussion some time ago at the Swamp regarding the discovery of a glitch by Luis (aka 'LE' / 'Spike Wilbury') in which a separate-namespace VLX could be embedded into a drawing and therefore evaluated by means of a persistent reactor - some could reproduce the glitch, others could not. Obviously the topic was extremely controversial given that the prospect of this possibility presents a huge security risk and is not something I would suggest pursuing.
    1 point
  8. Thanks guys, i eventually found a very old program called halftoner where you just drag an image into the program and it converts it for you in a few seconds!
    1 point
×
×
  • Create New...