macros - How to use identifier of view as parameter -
My question is how do I use visual identifier as a parameter?
code example:
dim DrwDocument DrawingDocument set DrwDocument = CATIA.ActiveDocument dimensions set iParameter as parameter iParameter = DrwDocument.Parameters.Item ("Drawing Sheet.1 \ ViewMakeUp.1 \ Scale ") MyText.InsertVariable as 0, 0, IParameter But how can I access the view identifier and use it as a parameter?
Thank you!
After
OK, if you do this, then you should first create a parameter in DrawingDocument . Object If something happens to your current code then:
parameter set identifierParam = MyDrawingDocument.Parameters.CreateString (dim IndetifierParam as "ViewIdentifier") , "A") MyText.Text = "View ID:" 'Note: Excerpt MyText.InsertVariable Lane (MyText.Text), see two spaces with the last character at the end of 0, IdentifierParam' first parameter insert status, The second parameter is how many characters overwrite, the third parameter is Now, come to the drawing tree on the left side Will set the parameters of your new string parameter. Double-click the parameter and edit it ... The drawing test will automatically change the drawing text with the parameter value. Apart from this, as an added benefit, this is to modify a parameter compared to very easy drawing text in a VBA script
or to change this new parameter:.
IdentifierParam .ValuateFromString "A" 'Adding a String or Variable Here Finally, an additional tip, go to the tool - & gt; Assess with options and click parameters and trees, and first they are the first two check boxes with "value" and "formula" with "knowledge" checking on the tabs first.
Comments
Post a Comment