Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Selecting a Profile Path

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
vinodh_a_83
1011 Views, 9 Replies

Selecting a Profile Path

I am in need to select a profile path using interaction events. How can it be done?
Is there any filters available for a Profile Path Selection?
Or Suggest me any other ways for this...

Regards,
Vinodh.A
9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: vinodh_a_83

Unfortunately, the API does not support the selections of profiles within
InteractionEvents. We do recognize the need for this and intend to provide
this in a future release.

For now, you will need to build the profile yourself (not trivial, but can
be done by inferring the end-to-end connections). Displaying a shaded
profile to the user will require the use of client graphics. This is even
harder, but can be done in theory.

Sanjay-

wrote in message news:5633358@discussion.autodesk.com...
I am in need to select a profile path using interaction events. How can it
be done?
Is there any filters available for a Profile Path Selection?
Or Suggest me any other ways for this...

Regards,
Vinodh.A
Message 3 of 10
Anonymous
in reply to: vinodh_a_83

Hei,
Thank You for your reply.

We were doing the profile selection in the same way as you said. But we are not using the client graphics(It takes more time to draw curve(Like circle e, arc) entities.) , we are using the highlight set to display the entities.

We got some problems with elliptical arc. When accessing elliptical arc through Profiles->ProfilePath->ProfileEntity->Curve (If an ellipse is part of a profile, The part should be an elliptical arc. so we could not use Profiles->ProfilePath->ProfileEntity->SketchEntity in this case.) the geometry(ElliptcalArc2d) returned is not giving correct data. Some times it gives circular angles , some times elliptcal angles. I think Some times the Start point and end point are also wrong.

Is there any problem with the geometry returned?
If yes,
How can i get the correct data for Elliptical Arcs?
If No,
What is wrong with my understanding?

Please help me in this....


Regards,
Vinodh.A
Message 4 of 10
marin_israel
in reply to: Anonymous

Hi!

Is it always true in 2013?

 

I try to select a profile and I have error on execution.

Check attach file for code and error.

 

Thanks a lot!!

-------------------------------------
Israël Marin
Programmeur | Programmer
Logiflex
Tags (2)
Message 5 of 10

Hi,

 

It looks it works to me. I used the following small code to give a test.

 

Public Sub GetSingleSelection()

' Get a feature selection from the user
Dim oObject As Object
Set oObject = ThisApplication.CommandManager.Pick(kSketchProfileFilter, "Pick a path")

MsgBox "Picked: " & oObject.Type

End Sub

Message 6 of 10

Thanks to test it for me!!

 

But, I have the same error... When I execute the "Pick" line, I can click on my profile in IV2013 but VS2010 raise the "nullreferenceexception" Check attach file.

 

I don't understand why...

Need update, option in IV or something?

-------------------------------------
Israël Marin
Programmeur | Programmer
Logiflex
Message 7 of 10

sorry, I am not familar with the language you are written in. It looks it reported Pointer is invalid? I am not sure how the problem is caused from. I'd suggest you share a demo code, instead of a code snippet. In addition, goApp is not Nothing, right? 

Message 8 of 10

Thanks to help me...

 

You make me realize that's just a problem of context...  I reorder my code and it works fine!

You have to be in sketch context... not in part.

-------------------------------------
Israël Marin
Programmeur | Programmer
Logiflex
Message 9 of 10

Hi,

I tested my new informations about profile and pick fonction... and I conclude I can only do the pick(profile) in part open and not in part modification(in assembly context)... it is normal? Because it's annoying to demand to users to draw the sketch in context and after open the part to select the profile.

 

And when I do a extrude feature with this profile: the feature have a weird behavior. When I delete the feature, it's impossible to delete the sketch at the same time. As the feature and the sketch are not link...

 

In addition, if I do the extrude feature with the profile of addforsolid, everything is allright! I can have the profile in assembly context and when I delete the feature: the sketch is delete too.

 

Anyone can help me?

 

Thanks!!

-------------------------------------
Israël Marin
Programmeur | Programmer
Logiflex
Message 10 of 10

Hi,

the situation push me to test the selection of a profile...

 

Can you can test it with this example... I put in zip file: .iam, .ipt and 2 demo code(Part context and Assembly context)

 

I have 2 way to do it as I say in my previous post:

-Assembly context (part edit only) -> pick command crash

 

-Part context (part open)->pick command works but if I close all, re-open the assembly and make a change on the base extrude of the part... the extrude with the profile(hole in the base extrude) get with the pick command give error...  It's hard for me to explain, please check my example.

 

In my case, the assembly context is more interesting.

 

Thanks to take time for me, it's really important for my project!

-------------------------------------
Israël Marin
Programmeur | Programmer
Logiflex

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report