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..
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
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?
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.
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?
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
Thanks that will certain help for the non-factory models. Will have to wait and see if Autodesk ever release API for factory then.
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