Author Topic: Macro Documentation  (Read 495 times)

jwillard

  • Newbie
  • *
  • Posts: 12
Macro Documentation
« on: December 25, 2017, 04:17:33 PM »
Is there a location where I can download the full Macro documentation? I found a source online but it's very cumbersome to actually read. https://www.yumpu.com/en/document/view/51449348/macro-language-statements/70

I'd like to find this in a standard pdf format, hopefully indexed. It will make learning this a bunch easier. The Developers Guide book is OK but it doesn't have info on all the functions, keywords etc.
Thanks
Jeff

Rob S

  • Hero Member
  • *****
  • Posts: 4522
    • Construction Estimating Program for General Contractors
Re: Macro Documentation
« Reply #1 on: December 26, 2017, 08:35:34 AM »

A complete reference has not been compiled since V17, but the basics are the same, and we have a pdf of the subsequent changes.

Here are a couple of things I found in my collection of DCAD files
User since Pro-design

jwillard

  • Newbie
  • *
  • Posts: 12
Re: Macro Documentation
« Reply #2 on: December 26, 2017, 09:45:51 AM »
Thanks Rob, I'm grabbing those now. The one I found on line seemed very complete and organized as a programmer would use it. It did seem a little dated and from the looks of the page headers, perhaps not a US version.

While I have you here, I've got a question perhaps you can answer. I've created a macro to create a huge grid of holes. I would like to programmatically set the Name property for each hole as I create them. It doesn't appear to be a property of the "CircleX" command and I'm guessing it will involve Entity properties and utilize a Put/Get process

Rob S

  • Hero Member
  • *****
  • Posts: 4522
    • Construction Estimating Program for General Contractors
Re: Macro Documentation
« Reply #3 on: December 26, 2017, 11:06:46 AM »
Someone other than me will be the expert on that, once they recover from their Christmas dinner.
User since Pro-design

jwillard

  • Newbie
  • *
  • Posts: 12
Re: Macro Documentation
« Reply #4 on: December 26, 2017, 11:52:34 AM »
Hey, I just had MORE Christmas Dinner for lunch. :)

Bob P

  • Hero Member
  • *****
  • Posts: 1201
    • Era Replica Automobiles
Re: Macro Documentation
« Reply #5 on: December 26, 2017, 04:31:38 PM »
JWillard,

Do you have the latest sys$(x) list? It looks like sys$(300) might be the way to assign names to entities. It's a little ambiguous in the documentation though. I've attached the newest sys*() files that I have.
« Last Edit: December 26, 2017, 04:34:36 PM by Bob P »

jwillard

  • Newbie
  • *
  • Posts: 12
Re: Macro Documentation
« Reply #6 on: December 27, 2017, 06:16:11 AM »
"a little ambiguous" is an understatement, and I can see how those without a programming background can really get lost and frustrated.

That's exactly what I was needing though. I'll experiment a bit.
Thanks Bob

Lar

  • Hero Member
  • *****
  • Posts: 2780
Re: Macro Documentation
« Reply #7 on: December 27, 2017, 09:02:18 AM »
My entity names often disappear so I wouldn't use them to identify stuff in a macro. The entity id will most likely fluctuate between writing the macro and using it so that isn't good either. If using VB I think you have access to and the ability to use the actual entity identifier (looks similar to the 'symbol id' in the Insert manager) but I could be wrong. You can also give an entity a unique 'custom property' (via the info box) and use that to find it (not sure about the finding part right now).

You can also define the entities to be a block, never duplicate it, let the macro find it by it's block name then duplicate and explode with select-when-created on, then use 'getentity' to get their entity id's (which will be the last set of entity numbers depending on the amount of new entities, ie, one will be sys(9), but using the entity id you can delete them later if the macro creates new entities. Also, using sys(9) and knowing the amount of new entities that will be created (when the block is exploded) you can determine the entity id's without having 'select when created' on  <<the entity id would not fluctuate during the running of the macro, unless the macro deletes one of them that is not the last>>).

Using basiccad I would use the layer-and/or-color combo to identify stuff (ie, if  the entities are unique I would put them on a dedicated layer, if not I would color the required entity one digit different from the RGB value of its compatriots).


Lar
« Last Edit: December 27, 2017, 09:08:52 AM by Lar »