- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, ok I know this is a newbie question, but I've looked through this site and other sources before just plain asking the people who would know.
I have a selection set filter set to get only circles and blocks (INSERT). Then it gets to a part of the code that says for each object in my group of objects... do something.
The first few lines of the "do something" are:
For Each bgaObjID In bgaObjIDs
Dim myBlockRef As DatabaseServices.BlockReference
myBlockRef = bgaObjID.GetObject(DatabaseServices.OpenMode.ForRead)
If it's a block, then it's just fine. If it's a circle, it crashes. Obviously circles aren't blocks and that's why it crashes. I'm trying to set up an If..Then statement so that blocks use one set of statements and circles use another. I've looked at the values for the objectID, but cannot tell how to determine if it's a block ref or a circle.
If it's a circle, I would use:
Dim tempCir As Circle = TryCast(bgaObjID.GetObject(DatabaseServices.OpenMode.ForRead), Circle)
Can someone help me out on this?
Thanks,
Mark
Solved! Go to Solution.