Hi,
I am creating "MyDwg" as drawing document under the root assembly.
I need to get the PDF out put of my drawing. For that i ma using Method mentioned in the below link
here I need to send Drawing document to be saved as PDF.
How we can get the Drawing document created through teh Child.
For Assembly we can send ""Autodesk.Intent.IntentAPI.Instance.HostAPI.TopLevelassembly" or "Autodesk.Intent.IntentAPI.Instance.HostAPI.HostObjectFromRefChain(Me.Refchain)".
what is method to get My child drawing as document to save as?.
Regards,
Appadurai.G
Solved! Go to Solution.
Solved by ebachrach. Go to Solution.
That same technique should work for obtaining the drawing document, where me.refchain would be changed to identify the drawing document child, not the assembly (the sample appears to have been a method written into a drawing document design)
In the sample you reference, that is exactly what is done in the lines i copied below:
'Set a reference to the active document (the document to be published).
Dim oDocument As Any
oDocument = Autodesk.Intent.IntentAPI.Instance.HostAPI.HostObj
ectFromRefChain(Me.Refchain)
Elly
Will "Me.Refchain" always refers the end child(i.e. Drawing).
I have Child rules in the root file for Assembly parts and Drawing creation.
And i have written Code to publish PDF in root deisgn as a child.
How "Me.Refchain" will refers to the Root's Child(Drawing document) apart from other child rules?
Can you brief me to understand this?
Regards,
Appadurai.G
in your case "me" won't help. "Me" refers to the ETO instance in which the expression is called. the ".refchain" is simply obtaining the reference chain for use in that function that identifies the inventor object.
What you need is a reference to the drawing document. In your case you say your method is in a child under the root, and your drawing document is for example something like root.drawingdocument. Something like this:
-Root
-- pdfcreation_child
--drawingdocument_child
your expression down in pdfcreat_child needs to reference root.drawingdocument_child.refchain. Or you could add a parameer to your pdfcreation_child for the root to pass in the drawingdocument part, so that you don't have a hardcoded reference.
Elly