Changes in VBA for 7.1 - Document Collections and Colors
Posted: Wed Jun 13, 2012 6:12 am
I am starting to work through updating my VBA code to ver 7.1, and have a few questions:
1) Am I correct in thinking that most (all?) of the document collections are now 0 based rather than 1 based. That is:
ver 6.6: IntelliCAD.ActiveDocument.Layers.Item(1) for layer "0"
ver 7.1: IntelliCAD.ActiveDocument.Layers.Item(0) for layer "0"
2) It looks like setting a line color is different with the new object model. Using
lineObj.color = vicRed
does not appear to work in 7.1. I am having a hard time figuring out what the new code should be. Is there an example in the help that I missed? If not, can someone post a short code segment?
Otherwise, that-you for adding VBA back in. It looks like 7.1 in general is a very nice upgrade from 6.6.
Thanks,
Erik
1) Am I correct in thinking that most (all?) of the document collections are now 0 based rather than 1 based. That is:
ver 6.6: IntelliCAD.ActiveDocument.Layers.Item(1) for layer "0"
ver 7.1: IntelliCAD.ActiveDocument.Layers.Item(0) for layer "0"
2) It looks like setting a line color is different with the new object model. Using
lineObj.color = vicRed
does not appear to work in 7.1. I am having a hard time figuring out what the new code should be. Is there an example in the help that I missed? If not, can someone post a short code segment?
Otherwise, that-you for adding VBA back in. It looks like 7.1 in general is a very nice upgrade from 6.6.
Thanks,
Erik