Unanswered MDT questions

Unanswered MDT questions

Anonymous
Not applicable
358 Views
13 Replies
Message 1 of 14

Unanswered MDT questions

Anonymous
Not applicable
Not sure why I keep posting MDT questions, but here goes another
one.

Why do I get errors on this after it has iterated thru a few
times. I think It might have something to do with the blank line
in the columns list but I am not sure.

Again any help appreciated. Why doesn't Autodesk ever show a
presence here?

For i = 0 To BOMstd.ColumnCount - 1
Set column = BOMstd.columns(i)
If column.Name <> "ITEM" And column.Name <> "QTY" And
column.Name <> "NAME" Then
BOMstd.RemoveColumn (i)
End If
Next

--
Kent Keller
Check out the Mechanical Desktop FAQ @
http://webhome.idirect.com/~dfulford/
0 Likes
359 Views
13 Replies
Replies (13)
Message 2 of 14

Anonymous
Not applicable
It would help to know exactly what kind of errors you are referring to but
one thing I can tell you right off the bat is that you are creating problems
for yourself by deleting members of a collection while in a loop. The Count
property is updated immediately whenever a member is added to or deleted
from a collection. So the moment you delete an item, your loop variable is
no longer valid AND you are accessing the wrong item from that point on. If
you delete the second item, the third takes its place, so when you access
item number 3, you really have item number 4 instead.

Try using a For Each loop instead. Or use your loop to collect the
string-based index of those columns you would like to delete and delete them
after the loop is complete, assuming they have a string-based index.

--
Visit me at: http://www2.stonemedia.com/franko

"Kent Keller" wrote in message
news:[email protected]...
> Not sure why I keep posting MDT questions, but here goes another
> one.
>
> Why do I get errors on this after it has iterated thru a few
> times. I think It might have something to do with the blank line
> in the columns list but I am not sure.
>
> Again any help appreciated. Why doesn't Autodesk ever show a
> presence here?
>
>
> For i = 0 To BOMstd.ColumnCount - 1
> Set column = BOMstd.columns(i)
> If column.Name <> "ITEM" And column.Name <> "QTY" And
> column.Name <> "NAME" Then
> BOMstd.RemoveColumn (i)
> End If
> Next
>
>
> --
> Kent Keller
> Check out the Mechanical Desktop FAQ @
> http://webhome.idirect.com/~dfulford/
>
>
>
0 Likes
Message 3 of 14

Anonymous
Not applicable
The error messages would go along with what you are explaining. I
don't remember the exact message, but it appeared it was trying to
delete a non existent column.

Ok so if I use a for each loop how do I give the index value to
remove column. It is looking for a long, not a name.

The second method are you saying to make a string of the names and
then use instr to get them back out to delete them?

What I am actually trying to do is I have a list of Names that I
want the columns to contain, and I don't want a bunch of extra
names. Ideally I would compare my list against the actual list of
column names and then delete and add as necessary. I haven't been
able to figure out a good way to go about this though.

Thanks for the help.

--
Kent Keller
Check out the Mechanical Desktop FAQ @
http://webhome.idirect.com/~dfulford/

"Frank Oquendo" wrote in message
news:[email protected]...
> It would help to know exactly what kind of errors you are
referring to but
> one thing I can tell you right off the bat is that you are
creating problems
> for yourself by deleting members of a collection while in a
loop. The Count
> property is updated immediately whenever a member is added to or
deleted
> from a collection. So the moment you delete an item, your loop
variable is
> no longer valid AND you are accessing the wrong item from that
point on. If
> you delete the second item, the third takes its place, so when
you access
> item number 3, you really have item number 4 instead.
>
> Try using a For Each loop instead. Or use your loop to collect
the
> string-based index of those columns you would like to delete and
delete them
> after the loop is complete, assuming they have a string-based
index.
>
> --
> Visit me at: http://www2.stonemedia.com/franko
0 Likes
Message 4 of 14

Anonymous
Not applicable
With a For Each loop, you don't specify an index at all. It works just like
the foreach statement in LISP. You will need a variable declared as the same
type contained by the collection (I have no idea what it is in this case).
For the sake of argument, let's say the data type is BOMColumn:

dim column As BOMColumn

For Each column In BOMstd.Colums
If column.Name <> "ITEM" And column.Name <> "QTY" And column.Name <>
"NAME" Then
column.Delete
End If
Next

Fair warning: not all collections support iteration using the For Each loop.

--
Visit me at: http://www2.stonemedia.com/franko

"Kent Keller" wrote in message
news:[email protected]...
> The error messages would go along with what you are explaining. I
> don't remember the exact message, but it appeared it was trying to
> delete a non existent column.
>
> Ok so if I use a for each loop how do I give the index value to
> remove column. It is looking for a long, not a name.
>
> The second method are you saying to make a string of the names and
> then use instr to get them back out to delete them?
>
> What I am actually trying to do is I have a list of Names that I
> want the columns to contain, and I don't want a bunch of extra
> names. Ideally I would compare my list against the actual list of
> column names and then delete and add as necessary. I haven't been
> able to figure out a good way to go about this though.
>
> Thanks for the help.
>
> --
> Kent Keller
> Check out the Mechanical Desktop FAQ @
> http://webhome.idirect.com/~dfulford/
>
> "Frank Oquendo" wrote in message
> news:[email protected]...
> > It would help to know exactly what kind of errors you are
> referring to but
> > one thing I can tell you right off the bat is that you are
> creating problems
> > for yourself by deleting members of a collection while in a
> loop. The Count
> > property is updated immediately whenever a member is added to or
> deleted
> > from a collection. So the moment you delete an item, your loop
> variable is
> > no longer valid AND you are accessing the wrong item from that
> point on. If
> > you delete the second item, the third takes its place, so when
> you access
> > item number 3, you really have item number 4 instead.
> >
> > Try using a For Each loop instead. Or use your loop to collect
> the
> > string-based index of those columns you would like to delete and
> delete them
> > after the loop is complete, assuming they have a string-based
> index.
> >
> > --
> > Visit me at: http://www2.stonemedia.com/franko
>
>
>
0 Likes
Message 5 of 14

Anonymous
Not applicable
Frank

I had tried something similar to this, but the problem comes in
that column.delete returns "Object doesn't support property or
method"

The only way I have found to delete columns is

BOMstd.RemoveColumn (I)

With I of course being a long generated by using

For I = 0 To BOMstd.ColumnCount - 1

--
Kent Keller
Check out the Mechanical Desktop FAQ @
http://webhome.idirect.com/~dfulford/

"Frank Oquendo" wrote in message
news:[email protected]...
> With a For Each loop, you don't specify an index at all. It
works just like
> the foreach statement in LISP. You will need a variable declared
as the same
> type contained by the collection (I have no idea what it is in
this case).
> For the sake of argument, let's say the data type is BOMColumn:
>
> dim column As BOMColumn
>
> For Each column In BOMstd.Colums
> If column.Name <> "ITEM" And column.Name <> "QTY" And
column.Name <>
> "NAME" Then
> column.Delete
> End If
> Next
>
> Fair warning: not all collections support iteration using the
For Each loop.
>
> --
0 Likes
Message 6 of 14

Anonymous
Not applicable
Then how about this:

For Each column In BOMstd.Columns
If column.Name <> "ITEM" And column.Name <> "QTY" And column.Name <>
"NAME" Then
BOMstd.RemoveColumn column.index
End If
Next

--
Visit me at: http://www2.stonemedia.com/franko

"Kent Keller" wrote in message
news:[email protected]...
> Frank
>
> I had tried something similar to this, but the problem comes in
> that column.delete returns "Object doesn't support property or
> method"
>
> The only way I have found to delete columns is
>
> BOMstd.RemoveColumn (I)
>
> With I of course being a long generated by using
>
> For I = 0 To BOMstd.ColumnCount - 1
>
> --
> Kent Keller
> Check out the Mechanical Desktop FAQ @
> http://webhome.idirect.com/~dfulford/
>
> "Frank Oquendo" wrote in message
> news:[email protected]...
> > With a For Each loop, you don't specify an index at all. It
> works just like
> > the foreach statement in LISP. You will need a variable declared
> as the same
> > type contained by the collection (I have no idea what it is in
> this case).
> > For the sake of argument, let's say the data type is BOMColumn:
> >
> > dim column As BOMColumn
> >
> > For Each column In BOMstd.Colums
> > If column.Name <> "ITEM" And column.Name <> "QTY" And
> column.Name <>
> > "NAME" Then
> > column.Delete
> > End If
> > Next
> >
> > Fair warning: not all collections support iteration using the
> For Each loop.
> >
> > --
>
>
>
0 Likes
Message 7 of 14

Anonymous
Not applicable
Closer

It looked like it was working and then it stopped on the line

If column.Name <> "ITEM" And column.Name <> "QTY" And column.Name
<> "NAME" Then

Saying "Method "Name" of object "IMcadColumnDefinition" failed.

I will play with it a little and see if I can figure out what went
wrong.

--
Kent Keller
Check out the Mechanical Desktop FAQ @
http://webhome.idirect.com/~dfulford/

"Frank Oquendo" wrote in message
news:[email protected]...
> Then how about this:
>
> For Each column In BOMstd.Columns
> If column.Name <> "ITEM" And column.Name <> "QTY" And
column.Name <>
> "NAME" Then
> BOMstd.RemoveColumn column.index
> End If
> Next
>
> --
> Visit me at: http://www2.stonemedia.com/franko
>
0 Likes
Message 8 of 14

Anonymous
Not applicable
Frank

I found this method and it seems to work fine now.

BOMstd.columns.Remove column.Index
Why we have this method and the other beats me. It was really odd
with the other line in there. It would stop on the line shown
below one time and then if you exited and ran it again it would go
thru a few times and then stop on the line after that one.

Now I am trying to figure out how to add all the columns I want.
This crazy thing lets you add duplicates, without a error message,
but when you then manually go into the symstd you have a mess,
that you sometimes can't clean up because there are certain
columns you can't delete, but yet you have duplicates so it
complains. I was hoping to just use a on error resume next but
........ I guess not.

Everything in the Mcad stuff seems twice as hard. I sure hope
they are improving the code along with the help files for the next
go.

--
Kent Keller
Check out the Mechanical Desktop FAQ @
http://webhome.idirect.com/~dfulford/

"Kent Keller" wrote in message
news:[email protected]...
> Closer
>
> It looked like it was working and then it stopped on the line
>
> If column.Name <> "ITEM" And column.Name <> "QTY" And
column.Name
> <> "NAME" Then
>
> Saying "Method "Name" of object "IMcadColumnDefinition"
failed.
>
> I will play with it a little and see if I can figure out what
went
> wrong.
>
> --
> Kent Keller
> Check out the Mechanical Desktop FAQ @
> http://webhome.idirect.com/~dfulford/
>
> "Frank Oquendo" wrote in message
> news:[email protected]...
> > Then how about this:
> >
> > For Each column In BOMstd.Columns
> > If column.Name <> "ITEM" And column.Name <> "QTY" And
> column.Name <>
> > "NAME" Then
> > BOMstd.RemoveColumn column.index
> > End If
> > Next
> >
> > --
> > Visit me at: http://www2.stonemedia.com/franko
> >
>
>
>
0 Likes
Message 9 of 14

Anonymous
Not applicable
So what does your final loop look like? Considering the dearth of MCAD info,
it sure would help to have a sample of working code. If you don't mind
sharing, of course.

--
Visit me at: http://www2.stonemedia.com/franko

"Kent Keller" wrote in message
news:[email protected]...
> Frank
>
> I found this method and it seems to work fine now.
>
> BOMstd.columns.Remove column.Index
> Why we have this method and the other beats me. It was really odd
> with the other line in there. It would stop on the line shown
> below one time and then if you exited and ran it again it would go
> thru a few times and then stop on the line after that one.
>
> Now I am trying to figure out how to add all the columns I want.
> This crazy thing lets you add duplicates, without a error message,
> but when you then manually go into the symstd you have a mess,
> that you sometimes can't clean up because there are certain
> columns you can't delete, but yet you have duplicates so it
> complains. I was hoping to just use a on error resume next but
> ........ I guess not.
>
> Everything in the Mcad stuff seems twice as hard. I sure hope
> they are improving the code along with the help files for the next
> go.
>
> --
> Kent Keller
> Check out the Mechanical Desktop FAQ @
> http://webhome.idirect.com/~dfulford/
>
> "Kent Keller" wrote in message
> news:[email protected]...
> > Closer
> >
> > It looked like it was working and then it stopped on the line
> >
> > If column.Name <> "ITEM" And column.Name <> "QTY" And
> column.Name
> > <> "NAME" Then
> >
> > Saying "Method "Name" of object "IMcadColumnDefinition"
> failed.
> >
> > I will play with it a little and see if I can figure out what
> went
> > wrong.
> >
> > --
> > Kent Keller
> > Check out the Mechanical Desktop FAQ @
> > http://webhome.idirect.com/~dfulford/
> >
> > "Frank Oquendo" wrote in message
> > news:[email protected]...
> > > Then how about this:
> > >
> > > For Each column In BOMstd.Columns
> > > If column.Name <> "ITEM" And column.Name <> "QTY" And
> > column.Name <>
> > > "NAME" Then
> > > BOMstd.RemoveColumn column.index
> > > End If
> > > Next
> > >
> > > --
> > > Visit me at: http://www2.stonemedia.com/franko
> > >
> >
> >
> >
>
>
0 Likes
Message 10 of 14

Anonymous
Not applicable
Well I am ashamed to say that somewhere along the way I must have
started re writing the code under

On Error Resume Next

when it used to be above it.

If I remove that then this hangs also. I am about ready to
totally give up on writing anything with the Mcad stuff. I can
never tell if it is my Newbe - ness, or the poor documentation(so
if I keep working I will eventually end up with something that
works, or that it just plain doesn't work at all.

Frustrated......

For Each column In BOMstd.columns
Debug.Print column.Name
If column.Name <> "ITEM" And column.Name <> "DET" And
column.Name <> "QTY" And column.Name <> "SHEET" And _
column.Name <> "NAME" And column.Name <> "DESCRIPTION" And
column.Name <> "STK_SIZE" And column.Name <> "MATERIAL" And _
column.Name <> "HT" And column.Name <> "NOTES" And
column.Name <> "RELEASED" And column.Name <> "REVISED" Then
BOMstd.columns.Remove column.Index
End If
Next

--
Kent Keller
Check out the Mechanical Desktop FAQ @
http://webhome.idirect.com/~dfulford/

"Frank Oquendo" wrote in message
news:[email protected]...
> So what does your final loop look like? Considering the dearth
of MCAD info,
> it sure would help to have a sample of working code. If you
don't mind
> sharing, of course.
>
> --
> Visit me at: http://www2.stonemedia.com/franko
>
>
> "Kent Keller" wrote in message
> news:[email protected]...
> > Frank
> >
> > I found this method and it seems to work fine now.
> >
> > BOMstd.columns.Remove column.Index
> > Why we have this method and the other beats me. It was really
odd
> > with the other line in there. It would stop on the line shown
> > below one time and then if you exited and ran it again it
would go
> > thru a few times and then stop on the line after that one.
> >
> > Now I am trying to figure out how to add all the columns I
want.
> > This crazy thing lets you add duplicates, without a error
message,
> > but when you then manually go into the symstd you have a mess,
> > that you sometimes can't clean up because there are certain
> > columns you can't delete, but yet you have duplicates so it
> > complains. I was hoping to just use a on error resume next
but
> > ........ I guess not.
> >
> > Everything in the Mcad stuff seems twice as hard. I sure
hope
> > they are improving the code along with the help files for the
next
> > go.
> >
> > --
> > Kent Keller
> > Check out the Mechanical Desktop FAQ @
> > http://webhome.idirect.com/~dfulford/
> >
> > "Kent Keller" wrote in message
> > news:[email protected]...
> > > Closer
> > >
> > > It looked like it was working and then it stopped on the
line
> > >
> > > If column.Name <> "ITEM" And column.Name <> "QTY" And
> > column.Name
> > > <> "NAME" Then
> > >
> > > Saying "Method "Name" of object "IMcadColumnDefinition"
> > failed.
> > >
> > > I will play with it a little and see if I can figure out
what
> > went
> > > wrong.
> > >
> > > --
> > > Kent Keller
> > > Check out the Mechanical Desktop FAQ @
> > > http://webhome.idirect.com/~dfulford/
> > >
> > > "Frank Oquendo" wrote in
message
> > > news:[email protected]...
> > > > Then how about this:
> > > >
> > > > For Each column In BOMstd.Columns
> > > > If column.Name <> "ITEM" And column.Name <> "QTY" And
> > > column.Name <>
> > > > "NAME" Then
> > > > BOMstd.RemoveColumn column.index
> > > > End If
> > > > Next
> > > >
> > > > --
> > > > Visit me at: http://www2.stonemedia.com/franko
> > > >
> > >
> > >
> > >
> >
> >
>
>
0 Likes
Message 11 of 14

Anonymous
Not applicable
Hi Kent & Frank,

Here it is Monday and I find two extremely over committed people working on
the weekend "Whats up with that?" ;~)

After reading your thread and thinking about your problem I started thinking
about my program for partlist standardization and thought I might ask as
well as share.

Kent, would it work to just redefine the BOM and not try to build a circle
out of a square? For my BOM/Partlist stuff I redefined what the
BOM/Partlist looked like by using a template drawing and creating my own
Symbol standard. This works great for imposing your own standard on a
part/assy. If you look through the symbol standards there is a spot in
there to redefine it and apply a custom scheme.

Kent Keller wrote in message <[email protected]>...
>Well I am ashamed to say that somewhere along the way I must have
>started re writing the code under
>
>On Error Resume Next
>
>when it used to be above it.
>
>If I remove that then this hangs also. I am about ready to
>totally give up on writing anything with the Mcad stuff. I can
>never tell if it is my Newbe - ness, or the poor documentation(so
>if I keep working I will eventually end up with something that
>works, or that it just plain doesn't work at all.
>
>Frustrated......
>
>
> For Each column In BOMstd.columns
> Debug.Print column.Name
> If column.Name <> "ITEM" And column.Name <> "DET" And
>column.Name <> "QTY" And column.Name <> "SHEET" And _
> column.Name <> "NAME" And column.Name <> "DESCRIPTION" And
>column.Name <> "STK_SIZE" And column.Name <> "MATERIAL" And _
> column.Name <> "HT" And column.Name <> "NOTES" And
>column.Name <> "RELEASED" And column.Name <> "REVISED" Then
> BOMstd.columns.Remove column.Index
> End If
>Next
>
>--
>Kent Keller
>Check out the Mechanical Desktop FAQ @
>http://webhome.idirect.com/~dfulford/
>
>"Frank Oquendo" wrote in message
>news:[email protected]...
>> So what does your final loop look like? Considering the dearth
>of MCAD info,
>> it sure would help to have a sample of working code. If you
>don't mind
>> sharing, of course.
>>
>> --
>> Visit me at: http://www2.stonemedia.com/franko
>>
>>
>> "Kent Keller" wrote in message
>> news:[email protected]...
>> > Frank
>> >
>> > I found this method and it seems to work fine now.
>> >
>> > BOMstd.columns.Remove column.Index
>> > Why we have this method and the other beats me. It was really
>odd
>> > with the other line in there. It would stop on the line shown
>> > below one time and then if you exited and ran it again it
>would go
>> > thru a few times and then stop on the line after that one.
>> >
>> > Now I am trying to figure out how to add all the columns I
>want.
>> > This crazy thing lets you add duplicates, without a error
>message,
>> > but when you then manually go into the symstd you have a mess,
>> > that you sometimes can't clean up because there are certain
>> > columns you can't delete, but yet you have duplicates so it
>> > complains. I was hoping to just use a on error resume next
>but
>> > ........ I guess not.
>> >
>> > Everything in the Mcad stuff seems twice as hard. I sure
>hope
>> > they are improving the code along with the help files for the
>next
>> > go.
>> >
>> > --
>> > Kent Keller
>> > Check out the Mechanical Desktop FAQ @
>> > http://webhome.idirect.com/~dfulford/
>> >
>> > "Kent Keller" wrote in message
>> > news:[email protected]...
>> > > Closer
>> > >
>> > > It looked like it was working and then it stopped on the
>line
>> > >
>> > > If column.Name <> "ITEM" And column.Name <> "QTY" And
>> > column.Name
>> > > <> "NAME" Then
>> > >
>> > > Saying "Method "Name" of object "IMcadColumnDefinition"
>> > failed.
>> > >
>> > > I will play with it a little and see if I can figure out
>what
>> > went
>> > > wrong.
>> > >
>> > > --
>> > > Kent Keller
>> > > Check out the Mechanical Desktop FAQ @
>> > > http://webhome.idirect.com/~dfulford/
>> > >
>> > > "Frank Oquendo" wrote in
>message
>> > > news:[email protected]...
>> > > > Then how about this:
>> > > >
>> > > > For Each column In BOMstd.Columns
>> > > > If column.Name <> "ITEM" And column.Name <> "QTY" And
>> > > column.Name <>
>> > > > "NAME" Then
>> > > > BOMstd.RemoveColumn column.index
>> > > > End If
>> > > > Next
>> > > >
>> > > > --
>> > > > Visit me at: http://www2.stonemedia.com/franko
>> > > >
>> > >
>> > >
>> > >
>> >
>> >
>>
>>
>
>
0 Likes
Message 12 of 14

Anonymous
Not applicable
Hi Michael

Thanks for jumping in.

I try to keep learning time to evenings and weekends, and work time to the
9~5. Hence all the activity at those times.

I am not sure I follow what you are saying. I looked thru the symbol
standards and could not find a redefine method. I am not sure that would
work anyhow.

The issue came up when someone said the have some large qty of drawings with
the symstd set to ANSI and they want to add / remove columns and change
colors etc. Since ANSI in one drawing might be different from ANSI in
another, I was trying to remove all un-used un-needed columns etc. and
verify that what was wanted was either there or add it back.

If I change to a different standard, the existing partslist will need to be
deleted and recreated. We didn't want to have to do that if possible.

--
Kent Keller
Strobe Data Inc.
www.strobedata.com

Beta. Software undergoes beta testing shortly before it's released.
Beta is Latin for "still doesn't work."

"Michael Browne" wrote in message
news:[email protected]...
> Hi Kent & Frank,
>
> Here it is Monday and I find two extremely over committed people working
on
> the weekend "Whats up with that?" ;~)
>
> After reading your thread and thinking about your problem I started
thinking
> about my program for partlist standardization and thought I might ask as
> well as share.
>
> Kent, would it work to just redefine the BOM and not try to build a circle
> out of a square? For my BOM/Partlist stuff I redefined what the
> BOM/Partlist looked like by using a template drawing and creating my own
> Symbol standard. This works great for imposing your own standard on a
> part/assy. If you look through the symbol standards there is a spot in
> there to redefine it and apply a custom scheme.
0 Likes
Message 13 of 14

Anonymous
Not applicable
Frank

I finally got something to work. It isn't pretty, but so far it
seems to work

startover:
For i = 0 To BOMstd.columns.Count - 1
Set column = BOMstd.columns(i)
If column.Name <> "ITEM" And column.Name <> "DET" And
column.Name <> "QTY" And column.Name <> "SHEET" And _
column.Name <> "NAME" And column.Name <> "DESCRIPTION" And
column.Name <> "STK_SIZE" And column.Name <> "MATERIAL" And _
column.Name <> "HT" And column.Name <> "NOTES" And
column.Name <> "RELEASED" And column.Name <> "REVISED" Then
BOMstd.RemoveColumn (i)
GoTo startover:
End If
Next

Now I am trying to figure out adding columns and I have a feeling
I am making it a lot harder than it should be. I haven't been
able to figure out where it is that is causing me to go into a
never ending loop. I think it might have something to do with
mycollection counts from 1up and the Bomstand.columns count from 0
up. As usual I am floundering, See any glaring problems with
this other than it doesn't work 8-)

Dim strColumnName As String
For Each column In BOMstd.columns
strColumnName = strColumnName & " " & column.Name
Next
Debug.Print strColumnName
Dim MyCollection As New Collection
Dim fOO As String
fOO = "ITEM"
MyCollection.Add fOO

fOO = "REVISED"
MyCollection.Add fOO

Dim IsThere As Variant
addagain:
For i = 1 To MyCollection.Count
ilow = i - 1
IsThere = InStr(strColumnName, MyCollection.Item(i))
Debug.Print MyCollection.Item(i)
If IsThere <> 0 Then
Set column = BOMstd.columns.Item(i)
column.COLUMNTYPE = sbUnknownType
If column.Name = "ITEM" Or column.Name = "QTY" Or column.Name
= "SHEET" Then
column.DataType = sbInteger
Else
column.DataType = sbGeneralText
End If
Else
Set column = BOMstd.columns.Item(ilow)
If column.Name = "ITEM" Or column.Name = "QTY" Or column.Name
= "SHEET" Then
DataType = sbInteger
Else
DataType = sbGeneralText
End If
Set column = BOMstd.AddColumn(sbUnknownType, DataType,
MyCollection.Item(i), "PartNumber")
GoTo addagain:
End If

Next
--
Kent Keller
Check out the Mechanical Desktop FAQ @
http://webhome.idirect.com/~dfulford/

"Frank Oquendo" wrote in message
news:[email protected]...
> So what does your final loop look like? Considering the dearth
of MCAD info,
> it sure would help to have a sample of working code. If you
don't mind
> sharing, of course.
>
> --
> Visit me at: http://www2.stonemedia.com/franko
0 Likes
Message 14 of 14

Anonymous
Not applicable
I switched a few things around and got it going. So far I
haven't blown anything up with it so I have my fingers crossed.
Just a couple more things to go.

The ones that I think must be busted are

IsCustomBlockUsed
and
Scale in Symbb.StandardMgr.CurrentStandard

Neither one seems to want to accept anything I try setting them
to.

Anyone been able to do anything with these?

--
Kent Keller
Check out the Mechanical Desktop FAQ @
http://webhome.idirect.com/~dfulford/

"Kent Keller" wrote in message
news:[email protected]...
> Frank
>
> Now I am trying to figure out adding columns and I have a
feeling
> I am making it a lot harder than it should be. I haven't been
> able to figure out where it is that is causing me to go into a
> never ending loop. I think it might have something to do with
> mycollection counts from 1up and the Bomstand.columns count from
0
> up. As usual I am floundering, See any glaring problems with
> this other than it doesn't work 8-)
0 Likes