Factory Design Utilities Forum
Welcome to Autodesk’s Factory Design Utilities Forums. Share your knowledge, ask questions, and explore popular Factory Design Utilities topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 21
ADNpati
1909 Views, 20 Replies

FDS - API

Hello all,

 

Is there any way to build asset (using Asset Bulider) thru API?????? Using built in VBA in Inventor, is there is any chance of building factory assets, defining landing surface, insertion point , adding descriptors etc??

 

any help would be much appriciated..

Mechanical Engineer
Inventor Applications Engineer

--------------------------------------------------------------------------------------

If my solution seems to remedy your problem, please press the Accept Solution button, Some KUDOS -

-------------------------------------------------------------------------------------
20 REPLIES 20
Message 2 of 21
XuesongBai
in reply to: ADNpati

Hi there, Currently, the APIs of FDS is not avaiable now. Thanks, -Xuesong
Please mark as a solution if somehow I got it right.
Message 3 of 21
ADNpati
in reply to: XuesongBai

Thanks mate, looks like FDS API is there in FDS 2015. Right??
Mechanical Engineer
Inventor Applications Engineer

--------------------------------------------------------------------------------------

If my solution seems to remedy your problem, please press the Accept Solution button, Some KUDOS -

-------------------------------------------------------------------------------------
Message 4 of 21

All,

 

Is the API available now for FDS 2016?  If you have any questions, please do not hesitate to contact me.  Hope all is well and have a most blessed day!

 

Peace,

Pete

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
Message 5 of 21

Hi Pete, The 2016 API exposes the ability to enumerate asset instances in the layout and manipulate their instance properties. What type of API-driven workflow were you thinking about? Oleg
Message 6 of 21

Thanks for the update Oleg!  I don't have any particular workflow in mind, but a client of mine was asking.  Is there a way to get a list of the new objects and operations that are available via API?

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
Message 7 of 21

No formal documentation yet - work in progress Oleg
Message 8 of 21
LukeDavenport
in reply to: olegd.prod

 

Hi Oleg,

Any update on this please?

Thanks

Luke

Message 9 of 21
olegd.prod
in reply to: LukeDavenport

Hi Luke,
If you are asking about formal documentation - no, nothing yet.

Oleg
Message 10 of 21
LukeDavenport
in reply to: olegd.prod

Hi Oleg,
How about informal?
Thanks
Luke
Message 11 of 21
olegd.prod
in reply to: LukeDavenport
Message 12 of 21
wezpb
in reply to: XuesongBai

Is there an API for factory design utilities (within Inventor) yet? Specifically i would like access to the assigned layers so we can automate layering within the drawing to match the layers of those already assigned to the assets.

 

Thanks.

Message 13 of 21
olegd.prod
in reply to: wezpb

No changes here.
I am curious about your scenario - if you place an asset on a layer in Inventor, we will place it on that layer in ACAD. How is that different than what you are trying to do?

Oleg
Message 14 of 21
olegd.prod
in reply to: wezpb

No changes here.
I am curious about your scenario - if you place an asset on a layer in Inventor, we will place it on that layer in ACAD. How is that different than what you are trying to do?

Oleg
Message 15 of 21
wezpb
in reply to: ADNpati

I want the asset to be on the same layer on an inventor drawing, not acad
Message 16 of 21
olegd.prod
in reply to: wezpb

So first I have to confess my ignorance about layer behavior on Inventor drawings ... 😞
But with that said, I am not sure why you would need Factory API here... If Inventor API supports designating part/assembly-to-layer mappings, then this is something you should be able to do for Factory assets (they are just parts/assemblies in Inventor).

Or am I missing your point?
Message 17 of 21
wezpb
in reply to: olegd.prod

In Inventor Factory you assign a layer to the asset within the Layout Model. Are you saying this Layer information is available in the API/iLogic? do you have an example?

Message 18 of 21
petestrycharske
in reply to: wezpb

wezpb,

 

Good morning!  It's been a while since I've used this code, but if I remember correctly all you need to do is create each of the separate features as a new solid body and then this will create new layers and place the objects on those layers in an Inventor drawing.  I think you can also create the layers in the drawing ahead of time and then the objects will inherit those layer properties (color, etc.).  Let me know if you have any questions.  Hope this helps and have a most blessed day!

 

Peace,

Pete

 

oDrawDoc = ThisDrawing.Document

oModelDoc = ThisDrawing.ModelDocument

Dim oLayers As LayersEnumerator

oLayers = oDrawDoc.StylesManager.Layers

Dim transObjs As TransientObjects

transObjs = ThisApplication.TransientObjects

 

For Each oSheet As Sheet In oDrawDoc.Sheets

    For Each oView As DrawingView In oSheet.DrawingViews

        Dim oPartCompDef As ComponentDefinition = oModelDoc.ComponentDefinition

        'MessageBox.Show(oPartCompDef.SurfaceBodies.Count)

        For Each oSufaceBody As SurfaceBody In oPartCompDef.SurfaceBodies

            'MessageBox.Show(oSufaceBody.Name)

            Dim LayerName As Layer

            LayerName = oLayers.item(oSufaceBody.Name)

            Dim oDrawCurves As drawingCurvesEnumerator

            oDrawCurves = oView.DrawingCurves(oSufaceBody)

            Dim oObjColl As ObjectCollection

            oObjColl = transObjs.CreateObjectCollection()

            For Each oDrawCurve As DrawingCurve In oDrawCurves

                 Dim segment As DrawingCurveSegment

                For Each segment In oDrawCurve.Segments

                    oObjColl.Add(segment)

                Next

            Next

            Call oView.Parent.ChangeLayer(oObjColl, LayerName)

        Next

    Next

Next

 

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
Message 19 of 21
wezpb
in reply to: petestrycharske

Thanks that will certain help for the non-factory models. Will have to wait and see if Autodesk ever release API for factory then.

Message 20 of 21
petestrycharske
in reply to: wezpb

wezpb,

 

This is a rule that is used on the drawing.  It should work for factory assets as well.  In fact, it was a factory user who asked me to look into this.  You will only have to make the different components of an asset as different solids to get this to work.  Hope this helps and have a most blessed day!

 

Peace,
Pete

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.

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

Post to forums  

Autodesk Design & Make Report