Create GenericObject from Workplane

Create GenericObject from Workplane

Anonymous
Not applicable
358 Views
4 Replies
Message 1 of 5

Create GenericObject from Workplane

Anonymous
Not applicable
Hi all,

I have written an Add in with c#.
The main task of the Addin is to Include all workplanes in a Drawing view.
After i have collected all the workplanes from the derived Assembly in the view i want to start the command DrawingIncludeIndividualWorkFeaturesCtxCmd.
There for i fill the selectset with all the collected Workplanes.
But it doesn't work.
If I do the same with a preselected Workplane all works fine.
What must I do to translate a Workplane to an Generic Object

JesG
0 Likes
359 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
GenericObject is used to return something in the select set when the object
selected does not currently have support in the API. In your case, when you
select a work feature and then look at the select set you're seeing a
generic object. What's happening is that the API is looking at the
object(s) currently selected and then constructing an API wrapper of the
object to pass back through the SelectSet object. For a work plane there
isn't an API object that represents it, (at least not in the context of a
drawing). Rather than not do anything and report that the select set is
empty, we create a dummy generic object. It doesn't really represent the
work plane but is just a place holder in the select set object to indicate
that something was selected.

Because the API doesn't currently understand work planes I don't believe
there's a way to accomplish what you want. Sorry.
--
Brian Ekins
Autodesk Inventor API

wrote in message news:5121357@discussion.autodesk.com...
Hi all,

I have written an Add in with c#.
The main task of the Addin is to Include all workplanes in a Drawing view.
After i have collected all the workplanes from the derived Assembly in the
view i want to start the command
DrawingIncludeIndividualWorkFeaturesCtxCmd.
There for i fill the selectset with all the collected Workplanes.
But it doesn't work.
If I do the same with a preselected Workplane all works fine.
What must I do to translate a Workplane to an Generic Object

JesG
0 Likes
Message 3 of 5

Anonymous
Not applicable
Dear Brian,

is there a workaround or another solution ?

Kind regards,

JesG
0 Likes
Message 4 of 5

Anonymous
Not applicable
I just tried the only possible workaround that I'm aware of and it didn't
work in this case. Sorry, but I don't have any other ideas.
--
Brian Ekins
Autodesk Inventor API

wrote in message news:5122045@discussion.autodesk.com...
Dear Brian,

is there a workaround or another solution ?

Kind regards,

JesG
0 Likes
Message 5 of 5

Anonymous
Not applicable

GenericObject is an interface, not a class.

0 Likes