Author Topic: vl-propagate verses vl-bb-ref  (Read 3760 times)

0 Members and 1 Guest are viewing this topic.

mkweaver

  • Bull Frog
  • Posts: 352
vl-propagate verses vl-bb-ref
« on: December 08, 2011, 03:18:50 PM »
I have a global variable that needs to be consistent through all drawings open in the session and may be changed by any one/or more of those drawings.

vl-propagate:
  has to be set each time the value changes
  makes the value easily available in all drawings in the session
  will stomp on replace the value for that variable in all drawings

vl-bb-ref:
  has to be set each time the value changes
  retrieval is more involved than vl-propagate
  does not affect value variables in other drawings until handled by the code running in those drawings.

Are there any other pros and cons with using these two approaches?

Mike

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: vl-propagate verses vl-bb-ref
« Reply #1 on: December 08, 2011, 03:25:45 PM »
vl-bb-set / ret:
• faster (vl-propogate's speed a function of how many open docs)
• having said that, speed difference likely of zero consequence
• clear intention
• dealing with one variable instance
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: vl-propagate verses vl-bb-ref
« Reply #2 on: December 08, 2011, 03:31:08 PM »
I see you're back from Starbucks. :-P
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: vl-propagate verses vl-bb-ref
« Reply #3 on: December 08, 2011, 03:46:40 PM »
Still not enough for that other thread.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: vl-propagate verses vl-bb-ref
« Reply #4 on: December 08, 2011, 03:48:58 PM »
Still not enough for that other thread.
LoL
Well, my post was a complete shot in the dark.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

danallen

  • Guest
Re: vl-propagate verses vl-bb-ref
« Reply #5 on: December 08, 2011, 03:56:57 PM »
I recall that vl-propogate doesn't have access to the blackboard until after s::startup finishes, which makes it useless for loading variables to be used in s::startup or earlier routines when a drawing opens.  But that should be confirmed.

mkweaver

  • Bull Frog
  • Posts: 352
Re: vl-propagate verses vl-bb-ref
« Reply #6 on: December 08, 2011, 04:03:31 PM »
I recall that vl-propogate doesn't have access to the blackboard until after s::startup finishes, which makes it useless for loading variables to be used in s::startup or earlier routines when a drawing opens.  But that should be confirmed.
My variables won't be set during s::startup, but that would be a show stopper.

I think I'm going to go with vl-bb-set/ref.  I like minimize the use of global variables and vl-bb-set/ref seems the best way to do that.

Thanks,
Mike

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: vl-propagate verses vl-bb-ref
« Reply #7 on: February 16, 2018, 12:46:43 PM »
I recall that vl-propogate doesn't have access to the blackboard until after s::startup finishes, which makes it useless for loading variables to be used in s::startup or earlier routines when a drawing opens.

Thank for the confirmation. I am setting a variable in "acad.lsp", using (vl-propagate) to make sure the variable is the same in all future drawings, but it apparently does not happen until (like you say) - too late to be used in "acaddoc.lsp".